[MPlayer-cvslog] r20334 - trunk/libmpcodecs/ad_ffmpeg.c

reimar subversion at mplayerhq.hu
Sat Oct 21 19:01:45 CEST 2006


Author: reimar
Date: Sat Oct 21 19:01:45 2006
New Revision: 20334

Modified:
   trunk/libmpcodecs/ad_ffmpeg.c

Log:
Do not use sh_audio->wf values if they are definitely invalid


Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c	(original)
+++ trunk/libmpcodecs/ad_ffmpeg.c	Sat Oct 21 19:01:45 2006
@@ -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;



More information about the MPlayer-cvslog mailing list