# HG changeset patch # User reimar # Date 1185808775 0 # Node ID c23bbfc21ef61097d43fd2de4e8959826ec91049 # Parent b3726f27695f27950add0297172a6406d5ce53f2 Indicate desired number of output channels to ffmpeg audio decoder. diff -r b3726f27695f -r c23bbfc21ef6 libmpcodecs/ad_ffmpeg.c --- a/libmpcodecs/ad_ffmpeg.c Mon Jul 30 14:52:07 2007 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Mon Jul 30 15:19:35 2007 +0000 @@ -7,6 +7,7 @@ #include "help_mp.h" #include "ad_internal.h" +extern int audio_output_channels; #include "mpbswap.h" @@ -105,6 +106,8 @@ sh_audio->ds->ss_mul = 2*sh_audio->wf->nChannels; // 1 byte*ch/packet } + // Set desired number of channels + lavc_context->channels = audio_output_channels; // Decode at least 1 byte: (to get header filled) x=decode_audio(sh_audio,sh_audio->a_buffer,1,sh_audio->a_buffer_size); if(x>0) sh_audio->a_buffer_len=x;