# HG changeset patch # User rtogni # Date 1169937267 0 # Node ID 89fcce32d9d034f520fc3307e3fd38c2385e9044 # Parent 0421ee482f389f973062dbe5f9bc45b1e740c7e6 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 ((( diff -r 0421ee482f38 -r 89fcce32d9d0 libmpdemux/demux_real.c --- a/libmpdemux/demux_real.c Sat Jan 27 17:01:54 2007 +0000 +++ b/libmpdemux/demux_real.c Sat Jan 27 22:34:27 2007 +0000 @@ -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 =