diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-09-22 23:59:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-09-27 22:34:00 +0200 |
| commit | 19f51503621a57794bd79bac053c9e6549a69f46 (patch) | |
| tree | cde206b74b2d0dea3303f3e17fe986a88bd181be /src/lib/dcp_decoder.cc | |
| parent | c4f83cc70c38fc9aa887bbf54b48a21bd0c9881a (diff) | |
Fix failure to playback encrypted DCPs, introduced when adding DCPDecoder re-use optimisation.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 90b730f5b..95cad9266 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -44,6 +44,7 @@ #include <dcp/sound_frame.h> #include <dcp/sound_asset_reader.h> #include <dcp/subtitle_image.h> +#include <dcp/decrypted_kdm.h> #include <boost/foreach.hpp> #include <iostream> @@ -76,6 +77,14 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent if (old) { _reels = old->_reels; + + /* We might have gained a KDM since we made the Reel objects */ + if (_dcp_content->kdm ()) { + dcp::DecryptedKDM k = decrypted_kdm (); + BOOST_FOREACH (shared_ptr<dcp::Reel> i, _reels) { + i->add (k); + } + } } else { list<shared_ptr<dcp::CPL> > cpl_list = cpls (); |
