diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-10-15 22:04:53 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-10-16 00:07:59 +0200 |
| commit | 3f9b394d57e750624d361f5daae6db77079f862a (patch) | |
| tree | 9627561f0141db440fca8adfdbee50f30d2a7e1a /src | |
| parent | aea3b88c63895121cbb632dfc84755a11cdeffba (diff) | |
Fix assertion failure on making a VF, in certain circumstances.
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.
Forward-porter from 392d675f5799671abbcf1a9a47820321bcbdcca2 in master.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/writer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 9a0f83a22..915376055 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -269,8 +269,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 |
