# HG changeset patch # User reimar # Date 1161450105 0 # Node ID 5d9f478344953a1ebc6b4932882b02bfc3b686cf # Parent 5e5e6c0a98c361b5cc448ce88db3689280b67c3e Do not use sh_audio->wf values if they are definitely invalid diff -r 5e5e6c0a98c3 -r 5d9f47834495 libmpcodecs/ad_ffmpeg.c --- a/libmpcodecs/ad_ffmpeg.c Sat Oct 21 15:57:08 2006 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Sat Oct 21 17:01:45 2006 +0000 @@ -115,7 +115,9 @@ 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;