[Mplayer-cvslog] CVS: main/libmpdemux video.c,1.18,1.19

Alban Bedel CVS albeu at mplayerhq.hu
Mon Jun 10 11:59:54 CEST 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv9768/libmpdemux

Modified Files:
	video.c 
Log Message:
Fix asf stream wich were giving invalid frame times because the frame time
was 0.


Index: video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/video.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- video.c	2 May 2002 10:25:48 -0000	1.18
+++ video.c	10 Jun 2002 09:59:44 -0000	1.19
@@ -293,7 +293,7 @@
       case DEMUXER_TYPE_ASF: {
         float next_pts = ds_get_next_pts(d_video);
         float d= next_pts > 0 ? next_pts - d_video->pts : d_video->pts-pts1;
-        if(d>0){
+        if(d>=0){
           if(verbose)
             if((int)sh_video->fps==1000)
               mp_msg(MSGT_CPLAYER,MSGL_STATUS,"\navg. framerate: %d fps             \n",(int)(1.0f/d));
@@ -301,7 +301,7 @@
           sh_video->fps=1.0f/d;
           frame_time = d;
         } else {
-          mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nInvalid frame duration value. Defaulting to 1/25 sec.\n");
+          mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nInvalid frame duration value (%2.5f/%2.5f => %2.5f). Defaulting to 1/25 sec.\n",d_video->pts,next_pts,d);
           frame_time = 1/25.0;
         }
       }




More information about the MPlayer-cvslog mailing list