[MPlayer-cvslog] r22036 - trunk/libmpdemux/demux_real.c

rtogni subversion at mplayerhq.hu
Sat Jan 27 23:34:28 CET 2007


Author: rtogni
Date: Sat Jan 27 23:34:27 2007
New Revision: 22036

Modified:
   trunk/libmpdemux/demux_real.c

Log:
Call real_fix_timestamp() after seeking, to avoid video freezing 
because of wrong timestamps. Fixes seek_sample2.rmvb and others.
Patch by LR ))) hephooey ))(( gmail )( com (((


Modified: trunk/libmpdemux/demux_real.c
==============================================================================
--- trunk/libmpdemux/demux_real.c	(original)
+++ trunk/libmpdemux/demux_real.c	Sat Jan 27 23:34:27 2007
@@ -926,9 +926,10 @@
 			// this fragment is for new packet, close the old one
 			mp_msg(MSGT_DEMUX,MSGL_DBG2, "closing probably incomplete packet, len: %d  \n",dp->len);
 			if(priv->video_after_seek){
-			    dp->pts=timestamp;
 				priv->kf_base = 0;
 				priv->kf_pts = dp_hdr->timestamp;
+				dp->pts=
+				real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->frametime,sh_video->format);
 				priv->video_after_seek = 0;
 			} else if (dp_hdr->len >= 3)
 			    dp->pts =
@@ -963,9 +964,10 @@
  			    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "fragment (%d bytes) appended, %d bytes left\n",vpkg_offset,len);
 			    // we know that this is the last fragment -> we can close the packet!
 			    if(priv->video_after_seek){
-			        dp->pts=timestamp;
 				    priv->kf_base = 0;
 				    priv->kf_pts = dp_hdr->timestamp;
+				    dp->pts=
+				    real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->frametime,sh_video->format);
 				    priv->video_after_seek = 0;
 			    } else if (dp_hdr->len >= 3)
 				dp->pts =
@@ -1004,6 +1006,13 @@
 		    stream_read(demuxer->stream, dp_data, len);
 		    ds->asf_packet=dp;
 		    len=0;
+		    if(priv->video_after_seek){
+		        priv->kf_base = 0;
+		        priv->kf_pts = dp_hdr->timestamp;
+		        dp->pts=
+		        real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->frametime,sh_video->format);
+		        priv->video_after_seek = 0;
+		    }
 		    break;
 		}
 		// whole packet (not fragmented):
@@ -1019,9 +1028,10 @@
 		dp_hdr->len=vpkg_length; len-=vpkg_length;
 		stream_read(demuxer->stream, dp_data, vpkg_length);
 		if(priv->video_after_seek){
-		    dp->pts=timestamp;
 			priv->kf_base = 0;
 			priv->kf_pts = dp_hdr->timestamp;
+			dp->pts=
+			real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->frametime,sh_video->format);
 			priv->video_after_seek = 0;
 		} else if (dp_hdr->len >= 3)
 		    dp->pts =



More information about the MPlayer-cvslog mailing list