mirror of
https://github.com/mpv-player/mpv
synced 2024-12-16 03:45:23 +00:00
Using channel count, samplerate and input bps values from the container
instead of the decoder breaks some DTS samples where the container says the audio has 6 channels but the decoder gives 2. In this case take the number of channels from the decoder instead, the output will almost certainly be badly garbled anyway if the number of channels is wrong. patch by Uoti Urpala, uoti <<.>> urpala <<@>> pp1 <<.>> inet <<.>> fi git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18151 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2f9248f074
commit
d4e9855511
@ -113,7 +113,8 @@ static int init(sh_audio_t *sh_audio)
|
||||
sh_audio->samplerate=lavc_context->sample_rate;
|
||||
sh_audio->i_bps=lavc_context->bit_rate/8;
|
||||
if(sh_audio->wf){
|
||||
sh_audio->channels=sh_audio->wf->nChannels;
|
||||
// If the decoder uses the wrong number of channels all is lost anyway.
|
||||
// sh_audio->channels=sh_audio->wf->nChannels;
|
||||
sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
|
||||
sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user