diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/dcp.cc b/src/lib/dcp.cc index 6d5c0b291..f58b06b57 100644 --- a/src/lib/dcp.cc +++ b/src/lib/dcp.cc @@ -38,9 +38,6 @@ DCP::cpls () const BOOST_FOREACH (boost::filesystem::path i, _dcp_content->directories()) { shared_ptr<dcp::DCP> dcp (new dcp::DCP (i)); dcp->read (false, 0, true); - if (_dcp_content->kdm ()) { - dcp->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ())); - } dcps.push_back (dcp); BOOST_FOREACH (shared_ptr<dcp::CPL> i, dcp->cpls()) { cpls.push_back (i); @@ -55,5 +52,11 @@ DCP::cpls () const } } + if (_dcp_content->kdm ()) { + BOOST_FOREACH (shared_ptr<dcp::DCP> i, dcps) { + i->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ())); + } + } + return cpls; } |
