[MPlayer-cvslog] r32587 - trunk/libmpdemux/demux_ts.c
reimar
subversion at mplayerhq.hu
Sat Nov 6 17:38:00 CET 2010
Author: reimar
Date: Sat Nov 6 17:38:00 2010
New Revision: 32587
Log:
Fix subtitle sync issues by ensuring we enqueue all subtitle packets
before demuxing the next video packet.
Modified:
trunk/libmpdemux/demux_ts.c
Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c Sat Nov 6 17:05:00 2010 (r32586)
+++ trunk/libmpdemux/demux_ts.c Sat Nov 6 17:38:00 2010 (r32587)
@@ -2963,6 +2963,11 @@ static int ts_parse(demuxer_t *demuxer ,
//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);
}
More information about the MPlayer-cvslog
mailing list