X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fwriter.cc;h=88925cbbdbeb8596c1a809faf45884dad913b586;hb=a78b741c43830c84bcb4d18e3147746f13a668e5;hp=595915883228021dd49f86ce920ea9aa4f9492c0;hpb=988ed4fac88965f2fc260f55a05e2db87bb1ecb8;p=dcpomatic.git diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 595915883..88925cbbd 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -95,8 +95,9 @@ Writer::Writer (shared_ptr film, weak_ptr j) _subtitle_reel = _reels.begin (); /* Check that the signer is OK if we need one */ - if (_film->is_signed() && !Config::instance()->signer_chain()->valid ()) { - throw InvalidSignerError (); + string reason; + if (_film->is_signed() && !Config::instance()->signer_chain()->valid(&reason)) { + throw InvalidSignerError (reason); } } @@ -510,8 +511,9 @@ Writer::finish () if (_film->is_signed ()) { signer = Config::instance()->signer_chain (); /* We did check earlier, but check again here to be on the safe side */ - if (!signer->valid ()) { - throw InvalidSignerError (); + string reason; + if (!signer->valid (&reason)) { + throw InvalidSignerError (reason); } } @@ -540,13 +542,13 @@ Writer::can_fake_write (Frame frame) const } void -Writer::write (PlayerSubtitles subs) +Writer::write (PlayerSubtitles subs, DCPTimePeriod period) { if (subs.text.empty ()) { return; } - if (_subtitle_reel->period().to <= subs.from) { + if (_subtitle_reel->period().to <= period.from) { ++_subtitle_reel; }