summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-09-20 00:11:25 +0200
committerCarl Hetherington <cth@carlh.net>2019-09-20 00:28:24 +0200
commit730a0a42ae0a4428693c3b560044c777751939ce (patch)
tree073d9c4ec1d25e0f88239b297768d7087cd11ea7 /src/lib
parentc8d369f27ae1725abb241ac2fba425509a4e55d2 (diff)
Add a warning log when an assertion gets hit.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 38c4beaae..cc8556f3d 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -636,7 +636,11 @@ Player::pass ()
/* Sometimes the thing that happened last finishes fractionally before
or after this silence. Bodge the start time of the silence to fix it.
*/
- DCPOMATIC_ASSERT (labs(period.from.get() - _last_audio_time->get()) < 2);
+ int64_t const error = labs(period.from.get() - _last_audio_time->get());
+ if (error >= 2) {
+ _film->log()->log(String::compose("Silence starting before or after last audio by %1", error), LogEntry::TYPE_ERROR);
+ }
+ DCPOMATIC_ASSERT (error < 2);
period.from = *_last_audio_time;
}
if (period.duration() > one_video_frame()) {