Mercurial > mplayer.hg
changeset 18150:710d4bc5f8c9
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
author | diego |
---|---|
date | Wed, 19 Apr 2006 20:12:01 +0000 |
parents | 163fe5c2577d |
children | 2b48046d03e9 |
files | libmpcodecs/ad_ffmpeg.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Wed Apr 19 15:58:10 2006 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Wed Apr 19 20:12:01 2006 +0000 @@ -113,7 +113,8 @@ 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; }