summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-05-17 16:46:01 -0600
committerJohn Stebbins <[email protected]>2016-05-17 17:06:15 -0600
commit40f80f674c5c56ae72d41c72ce42b90789904829 (patch)
tree6c2736747403c2bfd6a6106bafc523e133bcbe1a
parentc73f00e3cac2e777d4d88d083784b3f27d9d1b35 (diff)
sync: estimate video frame drop duration better
-rw-r--r--libhb/sync.c9
1 files changed, 8 insertions, 1 deletions
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);