[MPlayer-cvslog] r23937 - trunk/libmpcodecs/ad_ffmpeg.c

reimar subversion at mplayerhq.hu
Mon Jul 30 17:19:36 CEST 2007


Author: reimar
Date: Mon Jul 30 17:19:35 2007
New Revision: 23937

Log:
Indicate desired number of output channels to ffmpeg audio decoder.


Modified:
   trunk/libmpcodecs/ad_ffmpeg.c

Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c	(original)
+++ trunk/libmpcodecs/ad_ffmpeg.c	Mon Jul 30 17:19:35 2007
@@ -7,6 +7,7 @@
 #include "help_mp.h"
 
 #include "ad_internal.h"
+extern int audio_output_channels;
 
 #include "mpbswap.h"
 
@@ -105,6 +106,8 @@ static int init(sh_audio_t *sh_audio)
        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;



More information about the MPlayer-cvslog mailing list