8cf7b6253f
locally: * fix audio when using bsdbt848 video driver (problems noted by simon@) * allow 24-bit audio output formats in the sndio backend (from ratchov@) mostly from edd@ (MAINTAINER)
31 lines
1.5 KiB
Plaintext
31 lines
1.5 KiB
Plaintext
$OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.4 2010/05/26 21:29:56 jakemsr Exp $
|
|
--- libmpcodecs/ad_faad.c.orig Wed Feb 17 21:36:00 2010
|
|
+++ libmpcodecs/ad_faad.c Mon Mar 8 14:37:50 2010
|
|
@@ -83,7 +83,7 @@ static int aac_probe(unsigned char *buffer, int len)
|
|
|
|
static int init(sh_audio_t *sh)
|
|
{
|
|
- unsigned long faac_samplerate;
|
|
+ unsigned int faac_samplerate;
|
|
unsigned char faac_channels;
|
|
int faac_init, pos = 0;
|
|
faac_hdec = faacDecOpen();
|
|
@@ -164,7 +164,7 @@ static int init(sh_audio_t *sh)
|
|
return 0;
|
|
} else {
|
|
mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", sh->a_in_buffer_len); // XXX: remove or move to debug!
|
|
- mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %ldHz channels: %d\n", faac_samplerate, faac_channels);
|
|
+ mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %dHz channels: %d\n", faac_samplerate, faac_channels);
|
|
// 8 channels is aac channel order #7.
|
|
sh->channels = faac_channels == 7 ? 8 : faac_channels;
|
|
if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
|
|
@@ -293,7 +293,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
|
|
} else {
|
|
/* XXX: samples already multiplied by channels! */
|
|
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%ld Bytes)!\n",
|
|
- sh->samplesize*faac_finfo.samples);
|
|
+ (long)sh->samplesize*faac_finfo.samples);
|
|
|
|
if (sh->channels >= 5)
|
|
reorder_channel_copy_nch(faac_sample_buffer,
|