summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-30 10:10:27 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-30 10:10:27 +0100
commita65adcd8375ba5c57cfd0ba8f9a97edd0113a0fd (patch)
treedcc01bc4dffd849ae739402362eb4971318a045e /src/lib
parent6ef3186a7d8288f668185af04946ef42f0cb3fce (diff)
Add a debug log for an assertion failure.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/reel_writer.cc9
1 files changed, 8 insertions, 1 deletions
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<ReferencedReelAsset> const & refs, list<shared_ptr
}
DCPOMATIC_ASSERT (reel_sound_asset);
- DCPOMATIC_ASSERT (reel_sound_asset->duration() == _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<dcp::ReelSubtitleAsset> reel_subtitle_asset;