diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-08 15:20:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-08 15:20:59 +0100 |
| commit | fefa8053a9921bb309aa856a6e1b305a8cba6a12 (patch) | |
| tree | 3b1df5b01141f99618cac8be66cf5a3c644ae78e /src/lib | |
| parent | 97632e5e91fc0e2c0a3dd84ed9a167f79e4bd14d (diff) | |
Fix assertion failure if rounding reduces remaining frames to 0.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 11440ec5e..fd83886db 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -794,7 +794,9 @@ Player::audio (weak_ptr<Piece> wp, AudioStreamPtr stream, ContentAudio content_a return; } else if (end > piece->content->end()) { Frame const remaining_frames = DCPTime(piece->content->end() - time).frames_round(_film->audio_frame_rate()); - DCPOMATIC_ASSERT (remaining_frames > 0); + if (remaining_frames == 0) { + return; + } shared_ptr<AudioBuffers> cut (new AudioBuffers (content_audio.audio->channels(), remaining_frames)); cut->copy_from (content_audio.audio.get(), remaining_frames, 0, 0); content_audio.audio = cut; |
