From a65adcd8375ba5c57cfd0ba8f9a97edd0113a0fd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 30 May 2017 10:10:27 +0100 Subject: [PATCH] Add a debug log for an assertion failure. --- src/lib/reel_writer.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index da79dfc04..13d62f86d 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -389,7 +389,14 @@ ReelWriter::create_reel (list const & refs, listduration() == _period.duration().frames_round (_film->video_frame_rate ())); + if (reel_sound_asset->duration() != _period.duration().frames_round (_film->video_frame_rate ())) { + LOG_ERROR ( + "Reel sound asset has length %1 but reel period is %2", + to_string(reel_sound_asset->duration()), + to_string(_period.duration().frames_round(_film->video_frame_rate())) + ); + DCPOMATIC_ASSERT (reel_sound_asset->duration() == _period.duration().frames_round (_film->video_frame_rate ())); + } reel->add (reel_sound_asset); shared_ptr reel_subtitle_asset; -- 2.30.2