mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 15:29:56 +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:
parent
1233361b46
commit
80e0ec3e10
@ -7,6 +7,7 @@
|
|||||||
#include "help_mp.h"
|
#include "help_mp.h"
|
||||||
|
|
||||||
#include "ad_internal.h"
|
#include "ad_internal.h"
|
||||||
|
extern int audio_output_channels;
|
||||||
|
|
||||||
#include "mpbswap.h"
|
#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
|
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)
|
// Decode at least 1 byte: (to get header filled)
|
||||||
x=decode_audio(sh_audio,sh_audio->a_buffer,1,sh_audio->a_buffer_size);
|
x=decode_audio(sh_audio,sh_audio->a_buffer,1,sh_audio->a_buffer_size);
|
||||||
if(x>0) sh_audio->a_buffer_len=x;
|
if(x>0) sh_audio->a_buffer_len=x;
|
||||||
|
Loading…
Reference in New Issue
Block a user