From 40f80f674c5c56ae72d41c72ce42b90789904829 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 17 May 2016 16:46:01 -0600 Subject: sync: estimate video frame drop duration better --- libhb/sync.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libhb') diff --git a/libhb/sync.c b/libhb/sync.c index b1d102e9d..52eb494a3 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -457,7 +457,14 @@ static void fixVideoOverlap( sync_stream_t * stream ) } hb_list_rem(stream->in_queue, buf); signalBuffer(stream); - stream->drop_duration += buf->s.duration; + // Video frame durations are assumed to be variable and are + // adjusted based on the start time of the next frame before + // we get to this point. + // + // Estimate duration dropped based on average framerate + stream->drop_duration += + 90000. * stream->common->job->title->vrate.den / + stream->common->job->title->vrate.num; stream->drop++; drop++; hb_buffer_close(&buf); -- cgit v1.2.3