From 1d31b9c7210833c2241a712a6b338c4aa9526393 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 17 May 2016 14:57:07 -0600 Subject: sync: handle very short streams better If the entire stream fits in the sync queues, the first PTS was not detected and initial offsets were not applied. --- libhb/sync.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libhb/sync.c b/libhb/sync.c index ca7a4063f..69e6d18e4 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -686,6 +686,10 @@ static void streamFlush( sync_stream_t * stream ) { while (hb_list_count(stream->in_queue) > 0) { + if (!stream->common->found_first_pts) + { + checkFirstPts(stream->common); + } fixStreamTimestamps(stream); hb_buffer_t * buf = hb_list_item(stream->in_queue, 0); if (buf != NULL) -- cgit v1.2.3