diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-02-16 23:52:39 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-02-16 23:53:01 +0000 |
| commit | 62890d211dd114c90e2f661ebbabd999850df6c3 (patch) | |
| tree | 8e8573554afd3fdd5b53c4232d0dfcc94d0e4f7d /src | |
| parent | 7147957ea5485a70580135cf32c43a05ed97a7f2 (diff) | |
Add log for assertion failure.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/player.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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<PlayerVideo> pv, DCPTime time) void Player::emit_audio (shared_ptr<AudioBuffers> 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); |
