mirror of https://github.com/mpv-player/mpv
Do not use sh_audio->wf values if they are definitely invalid
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20334 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
275e142fa7
commit
e9e5d67d19
|
@ -115,7 +115,9 @@ static int init(sh_audio_t *sh_audio)
|
|||
if(sh_audio->wf){
|
||||
// If the decoder uses the wrong number of channels all is lost anyway.
|
||||
// sh_audio->channels=sh_audio->wf->nChannels;
|
||||
if (sh_audio->wf->nSamplesPerSec)
|
||||
sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
|
||||
if (sh_audio->wf->nAvgBytesPerSec)
|
||||
sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
|
||||
}
|
||||
sh_audio->samplesize=2;
|
||||
|
|
Loading…
Reference in New Issue