Skip to content

Commit

Permalink
sync: fix delayed subtitles when burned-in
Browse files Browse the repository at this point in the history
sync was delaying delivery of subtitles which caused burn-in late.
  • Loading branch information
jstebbins committed Jan 27, 2016
1 parent fa95126 commit 4b408bc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libhb/sync.c
Expand Up @@ -801,6 +801,20 @@ static void OutputBuffer( sync_common_t * common )
if (hb_list_count(stream->in_queue) > stream->min_len)
{
buf = hb_list_item(stream->in_queue, 0);
if (stream->type == SYNC_TYPE_SUBTITLE)
{
// Forward subtitles immediately instead of interleaving.
//
// Normally, we interleave output by PTS in order to
// optimize sync recovery. This results in queueing
// stream data that may not get delivered to it's
// respecitive output fifo until the next input data
// is received for that stream. This isn't a problem
// for continuous streams like audio and video, but
// it delays subtitles unacceptably.
out_stream = stream;
break;
}
if (buf->s.start < pts)
{
pts = buf->s.start;
Expand Down

0 comments on commit 4b408bc

Please sign in to comment.