summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-10-15 22:04:53 +0000
committerCarl Hetherington <cth@carlh.net>2019-10-15 22:04:53 +0000
commit392d675f5799671abbcf1a9a47820321bcbdcca2 (patch)
treec16b8f92a193b9c70b017041c4aad3479ef50046 /src
parent7b83ed2e6aa876636158411b7d12a17a4123a8fa (diff)
Fix assertion failure on making a VF, in certain circumstances.v2.14.11
These circumstances were a VF which refers to at least one complete reel of audio from a OV before adding more audio of its own.
Diffstat (limited to 'src')
-rw-r--r--src/lib/writer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index ca412dd3f..f9009be37 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -268,8 +268,11 @@ Writer::write (shared_ptr<const AudioBuffers> audio, DCPTime const time)
/* Easy case: we can write all the audio to this reel */
_audio_reel->write (audio);
t = end;
+ } else if (_audio_reel->period().to <= t) {
+ /* This reel is entirely before the start of our audio; just skip the reel */
+ ++_audio_reel;
} else {
- /* Split the audio into two and write the first part */
+ /* This audio is over a reel boundary; split the audio into two and write the first part */
DCPTime part_lengths[2] = {
_audio_reel->period().to - t,
end - _audio_reel->period().to