Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / lib / writer.cc
index 9a0f83a22a5c184d68c3b5c5bc07789fe9fe3bca..cc645c8b07c82451428f352054dad25bfeec71e1 100644 (file)
@@ -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
@@ -558,6 +561,7 @@ Writer::finish ()
 
        cpl->set_metadata (meta);
        cpl->set_ratings (vector_to_list(_film->ratings()));
+       cpl->set_content_version_label_text (_film->content_version());
 
        shared_ptr<const dcp::CertificateChain> signer;
        if (_film->is_signed ()) {
@@ -777,4 +781,7 @@ Writer::set_digest_progress (Job* job, float progress)
        }
 
        job->set_progress (min_progress);
+
+       Waker waker;
+       waker.nudge ();
 }