1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 09:57:34 +00:00

Indicate desired number of output channels to ffmpeg audio decoder.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23937 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-07-30 15:19:35 +00:00
parent 1233361b46
commit 80e0ec3e10

View File

@ -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;