changeset 2826:17f46b2330e9

-nobps NaN fixed
author arpi
date Sun, 11 Nov 2001 13:25:06 +0000
parents c4b167e07a62
children b4d46817f050
files libmpdemux/demux_avi.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_avi.c	Sun Nov 11 13:23:28 2001 +0000
+++ b/libmpdemux/demux_avi.c	Sun Nov 11 13:25:06 2001 +0000
@@ -87,7 +87,9 @@
 //          printf("\rYYY-A  A: %5.3f  V: %5.3f  \n",priv->avi_audio_pts,priv->avi_video_pts);
           if(priv->pts_has_video){
 	      // we have video pts now
-	      float delay=(float)priv->pts_corr_bytes/((sh_audio_t*)(ds->sh))->wf->nAvgBytesPerSec;
+	      float delay=0;
+	      if(((sh_audio_t*)(ds->sh))->wf->nAvgBytesPerSec)
+	          delay=(float)priv->pts_corr_bytes/((sh_audio_t*)(ds->sh))->wf->nAvgBytesPerSec;
 	      mp_msg(MSGT_DEMUX,MSGL_V,"XXX initial  v_pts=%5.3f  a_pos=%d (%5.3f) \n",priv->avi_audio_pts,priv->pts_corr_bytes,delay);
 	      //priv->pts_correction=-priv->avi_audio_pts+delay;
 	      priv->pts_correction=delay-priv->avi_audio_pts;