changeset 23917:c23bbfc21ef6

Indicate desired number of output channels to ffmpeg audio decoder.
author reimar
date Mon, 30 Jul 2007 15:19:35 +0000
parents b3726f27695f
children f29d31547c31
files libmpcodecs/ad_ffmpeg.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;