Mercurial > mplayer.hg
comparison libmpcodecs/ad_ffmpeg.c @ 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 | 92c4247cc902 |
children | caac2ca98168 |
comparison
equal
deleted
inserted
replaced
18149:163fe5c2577d | 18150:710d4bc5f8c9 |
---|---|
111 | 111 |
112 sh_audio->channels=lavc_context->channels; | 112 sh_audio->channels=lavc_context->channels; |
113 sh_audio->samplerate=lavc_context->sample_rate; | 113 sh_audio->samplerate=lavc_context->sample_rate; |
114 sh_audio->i_bps=lavc_context->bit_rate/8; | 114 sh_audio->i_bps=lavc_context->bit_rate/8; |
115 if(sh_audio->wf){ | 115 if(sh_audio->wf){ |
116 sh_audio->channels=sh_audio->wf->nChannels; | 116 // If the decoder uses the wrong number of channels all is lost anyway. |
117 // sh_audio->channels=sh_audio->wf->nChannels; | |
117 sh_audio->samplerate=sh_audio->wf->nSamplesPerSec; | 118 sh_audio->samplerate=sh_audio->wf->nSamplesPerSec; |
118 sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; | 119 sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; |
119 } | 120 } |
120 sh_audio->samplesize=2; | 121 sh_audio->samplesize=2; |
121 return 1; | 122 return 1; |