mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
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
This commit is contained in:
parent
ac5d629479
commit
538674f6b6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user