summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-01 22:47:14 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-01 22:47:14 +0000
commit538674f6b6cb8139885cf2c8a3d3b8d32b88bc12 (patch)
tree57365c6af0ac3a840550f4a8e1bd58c81ed11fd9 /libmpdemux
parentac5d629479c4594c455d4c9d6e9610d725386feb (diff)
downloadmpv-538674f6b6cb8139885cf2c8a3d3b8d32b88bc12.tar.bz2
mpv-538674f6b6cb8139885cf2c8a3d3b8d32b88bc12.tar.xz
set dp->stream_pts only when feeding the video stream to workaround
strange interleaving patterns in some samples (that show with wild alternations of the OSD timer going back and forth) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21807 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_mpg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c
index 7a12f9c06a..d70ff19388 100644
--- a/libmpdemux/demux_mpg.c
+++ b/libmpdemux/demux_mpg.c
@@ -421,7 +421,13 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
len = l;
dp->pts=pts/90000.0f;
dp->pos=demux->filepos;
- if(stream_control(demux->stream, STREAM_CTRL_GET_CURRENT_TIME,(void *)&stream_pts)!=STREAM_UNSUPORTED)
+ /*
+ workaround:
+ set dp->stream_pts only when feeding the video stream, or strangely interleaved files
+ (such as SWIII) will show strange alternations in the stream time, wildly going
+ back and forth
+ */
+ if(ds == demux->video && stream_control(demux->stream, STREAM_CTRL_GET_CURRENT_TIME,(void *)&stream_pts)!=STREAM_UNSUPORTED)
dp->stream_pts = stream_pts;
ds_add_packet(ds,dp);
if (demux->priv) ((mpg_demuxer_t*)demux->priv)->last_pts = pts/90000.0f;