summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-27 22:34:27 +0000
committerrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-27 22:34:27 +0000
commitedf1fb46d2dc56ddc1f3ddf330a0d81de17f4514 (patch)
tree9c7467b835bac1bec95baf2c38dffb87d7d90197 /libmpdemux
parent91629bc1110f1d60fd53322e3b5f995f7a6ec0a7 (diff)
downloadmpv-edf1fb46d2dc56ddc1f3ddf330a0d81de17f4514.tar.bz2
mpv-edf1fb46d2dc56ddc1f3ddf330a0d81de17f4514.tar.xz
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 ((( git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22036 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_real.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c
index 4059b75543..36694c4104 100644
--- a/libmpdemux/demux_real.c
+++ b/libmpdemux/demux_real.c
@@ -926,9 +926,10 @@ got_video:
// 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 @@ got_video:
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 @@ got_video:
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 @@ got_video:
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 =