summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-19 20:12:01 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-19 20:12:01 +0000
commitd4e98555114a4e964d60a62ac12de76be80723a1 (patch)
tree0b44b8c08b84bae9b0cc2e88e3820b0757a4bf94
parent2f9248f0749f444f612c762664304cc9936ae376 (diff)
downloadmpv-d4e98555114a4e964d60a62ac12de76be80723a1.tar.bz2
mpv-d4e98555114a4e964d60a62ac12de76be80723a1.tar.xz
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
-rw-r--r--libmpcodecs/ad_ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
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;
}