From d4e98555114a4e964d60a62ac12de76be80723a1 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 19 Apr 2006 20:12:01 +0000 Subject: 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 --- libmpcodecs/ad_ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 06e7f2c2d0..22cb72b8a5 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -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; } -- cgit v1.2.3