mirror of
https://github.com/mpv-player/mpv
synced 2025-02-26 18:32:08 +00:00
demux_ts: Fix subtitle sync issues
Ensure we queue all subtitle packets before demuxing the next video packet. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32587 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c739ab2992
commit
47ba682a63
@ -2965,6 +2965,11 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||
//IS IT TIME TO QUEUE DATA to the dp_packet?
|
||||
if(is_start && (dp != NULL))
|
||||
{
|
||||
// subtitle packets _have_ to be submitted before video, otherwise
|
||||
// they might get stuck "forever" and subtitles will be completely
|
||||
// out of sync.
|
||||
if (is_video)
|
||||
fill_packet(demuxer, demuxer->sub, &priv->fifo[2].pack, &priv->fifo[2].offset, NULL);
|
||||
retv = fill_packet(demuxer, ds, dp, dp_offset, si);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user