# HG changeset patch # User nicodvb # Date 1167691634 0 # Node ID b266f27109a6aa86b9bd5e4c7fda1c98d7298b8d # Parent 04281be4fbdd541cddabe90a2d9ccf21e109866e 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) diff -r 04281be4fbdd -r b266f27109a6 libmpdemux/demux_mpg.c --- a/libmpdemux/demux_mpg.c Mon Jan 01 22:32:09 2007 +0000 +++ b/libmpdemux/demux_mpg.c Mon Jan 01 22:47:14 2007 +0000 @@ -421,7 +421,13 @@ 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;