[Mplayer-cvslog] CVS: main demux_avi.c,1.7,1.8

Arpi of Ize arpi at mplayer.dev.hu
Sat Jul 21 02:11:57 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv14672

Modified Files:
	demux_avi.c 
Log Message:
video pts calculation precision fixed

Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/demux_avi.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- demux_avi.c	3 Jun 2001 23:34:59 -0000	1.7
+++ demux_avi.c	21 Jul 2001 00:10:09 -0000	1.8
@@ -68,7 +68,7 @@
             pts=avi_audio_pts;
             avi_audio_pts=0;
   } else 
-  if(ds==demux->video){
+  if(ds && ds==demux->video){
      // video
      if(skip_video_frames>0){
        // drop frame (seeking)
@@ -82,8 +82,16 @@
      //avi_video_pts+=(float)avi_header.video.dwScale/(float)avi_header.video.dwRate;
      //avi_video_pts+=((sh_video_t*)ds->sh)->frametime;
 // FIXME!!!
+#if 1
+//       printf("ds=0x%X\n",ds);
+//       printf("packno=%d\n",ds->pack_no);
+       avi_video_pts = demux->video->pack_no *
+         (float)((sh_video_t*)demux->video->sh)->video.dwScale /
+	 (float)((sh_video_t*)demux->video->sh)->video.dwRate;
+#else
      avi_video_pts+=(float)((sh_video_t*)(demux->video->sh))->video.dwScale/(float)((sh_video_t*)(demux->video->sh))->video.dwRate;
 //     avi_video_pts+=avi_video_ftime;
+#endif
      avi_audio_pts=avi_video_pts;
   }
   




More information about the MPlayer-cvslog mailing list