From 62890d211dd114c90e2f661ebbabd999850df6c3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 16 Feb 2018 23:52:39 +0000 Subject: [PATCH] Add log for assertion failure. --- src/lib/player.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/player.cc b/src/lib/player.cc index 0f20dc7ec..71b04e7b2 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -989,6 +989,11 @@ Player::emit_video (shared_ptr pv, DCPTime time) void Player::emit_audio (shared_ptr data, DCPTime time) { + /* Log if the assert below is about to fail */ + if (_last_audio_time && time != *_last_audio_time) { + _film->log()->log(String::compose("Out-of-sequence emit %1 vs %2", to_string(time), to_string(*_last_audio_time)), LogEntry::TYPE_WARNING); + } + /* This audio must follow on from the previous */ DCPOMATIC_ASSERT (!_last_audio_time || time == *_last_audio_time); Audio (data, time); -- 2.30.2