X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmatcher.cc;h=9924c003ae5b81298ef27653e5ba015d7d312307;hb=8dd9ea3086b4934f2719648ffa6333c0d106ff36;hp=34ddc86d6d931eb0b6f61e8eba4c7abd0d68f651;hpb=6d21165ff96f354933ee32ce2ce31ee5ecc48598;p=dcpomatic.git diff --git a/src/lib/matcher.cc b/src/lib/matcher.cc index 34ddc86d6..9924c003a 100644 --- a/src/lib/matcher.cc +++ b/src/lib/matcher.cc @@ -41,7 +41,7 @@ Matcher::Matcher (shared_ptr log, int sample_rate, float frames_per_second) } void -Matcher::process_video (boost::shared_ptr image, bool same, boost::shared_ptr sub, double t) +Matcher::process_video (boost::shared_ptr image, bool same, boost::shared_ptr sub, double t) { _pixel_format = image->pixel_format (); _size = image->size (); @@ -90,11 +90,15 @@ Matcher::process_video (boost::shared_ptr image, bool same, boost::shared } void -Matcher::process_audio (boost::shared_ptr b, double t) +Matcher::process_audio (boost::shared_ptr b, double t) { _channels = b->channels (); - _log->log (String::compose ("Matcher audio @ %1 [video=%2, audio=%3, pending_audio=%4]", t, _video_frames, _audio_frames, _pending_audio.size())); + _log->log (String::compose ( + "Matcher audio (%1 frames) @ %2 [video=%3, audio=%4, pending_audio=%5]", + b->frames(), t, _video_frames, _audio_frames, _pending_audio.size() + ) + ); if (!_first_input) { _first_input = t; @@ -198,8 +202,9 @@ void Matcher::repeat_last_video () { if (!_last_image) { - _last_image.reset (new SimpleImage (_pixel_format.get(), _size.get(), true)); - _last_image->make_black (); + shared_ptr im (new SimpleImage (_pixel_format.get(), _size.get(), true)); + im->make_black (); + _last_image = im; } Video (_last_image, true, _last_subtitle);