From b3dfeeb7f960b6d3418005351f52c5f6b99e9636 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 6 Mar 2013 11:18:06 +0000 Subject: Tweak rounding. Pass pending video / audio back through so it is treated the same as the first time. --- src/lib/matcher.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/matcher.cc b/src/lib/matcher.cc index 749acf463..2c697157f 100644 --- a/src/lib/matcher.cc +++ b/src/lib/matcher.cc @@ -44,6 +44,8 @@ Matcher::process_video (boost::shared_ptr image, bool same, boost::shared _pixel_format = image->pixel_format (); _size = image->size (); + _log->log(String::compose("Matcher video @ %1 (same=%2)", t, same)); + if (!_first_input) { _first_input = t; } @@ -129,11 +131,11 @@ Matcher::fix_start () match (_pending_video.front().time - _pending_audio.front().time); for (list::iterator i = _pending_video.begin(); i != _pending_video.end(); ++i) { - Video (i->image, i->same, i->subtitle); + process_video (i->image, i->same, i->subtitle, i->time); } for (list::iterator i = _pending_audio.begin(); i != _pending_audio.end(); ++i) { - Audio (i->audio); + process_audio (i->audio, i->time); } _pending_video.clear (); @@ -165,7 +167,7 @@ Matcher::match (double extra_video_needed) /* Emit silence */ - int64_t to_do = rint (-extra_video_needed * _sample_rate); + int64_t to_do = -extra_video_needed * _sample_rate; _log->log (String::compose (N_("Emitted %1 frames of silence"), to_do)); /* Do things in half second blocks as I think there may be limits -- cgit v1.2.3