[Mplayer-cvslog] CVS: main mplayer.c,1.710,1.711

Tobias Diedrich CVS ranma at mplayerhq.hu
Sun Aug 10 19:58:48 CEST 2003


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

Modified Files:
	mplayer.c 
Log Message:
Prevent missing subtitles at pts reset.


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.710
retrieving revision 1.711
diff -u -r1.710 -r1.711
--- mplayer.c	9 Aug 2003 14:22:49 -0000	1.710
+++ mplayer.c	10 Aug 2003 17:58:22 -0000	1.711
@@ -3460,7 +3460,9 @@
       // DVD sub
       len = ds_get_packet_sub(d_dvdsub,(unsigned char**)&packet);
       if(len > 0) {
-	timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - sh_video->pts);
+	if (fabs(d_dvdsub->pts - sh_video->pts) < 10) // prevent missing subs on pts reset
+	  timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - sh_video->pts);
+	else timestamp = 90000*(sh_video->timer + sub_delay);
 	mp_dbg(MSGT_CPLAYER,MSGL_V,"\rDVD sub: len=%d  v_pts=%5.3f  s_pts=%5.3f  ts=%d \n",len,sh_video->pts,d_dvdsub->pts,timestamp);
       }
     }



More information about the MPlayer-cvslog mailing list