diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-13 23:36:22 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-13 23:36:22 +0200 |
| commit | 488e3d1bd5e6b17d49f6db4df14c64f4b64db89b (patch) | |
| tree | 641fcf167b845df6eca68c54fdf1110a7a07a739 /src/verify.cc | |
| parent | 51ae14c7e304d4fbc8d7524d584f3f4762d51f67 (diff) | |
Remove ReelEncryptableAsset and tidy up a bit.
Diffstat (limited to 'src/verify.cc')
| -rw-r--r-- | src/verify.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/verify.cc b/src/verify.cc index e176362a..a2298f38 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1088,14 +1088,9 @@ pkl_has_encrypted_assets (shared_ptr<DCP> dcp, shared_ptr<PKL> pkl) for (auto i: dcp->cpls()) { for (auto j: i->reel_file_assets()) { if (j->asset_ref().resolved()) { - /* It's a bit surprising / broken but Interop subtitle assets are represented - * in reels by ReelSubtitleAsset which inherits ReelEncryptableAsset, so it's possible for - * ReelEncryptableAssets to have assets which are not MXFs. - */ - if (auto asset = dynamic_pointer_cast<MXF>(j->asset_ref().asset())) { - if (asset->encrypted()) { - encrypted.push_back(j->asset_ref().id()); - } + auto mxf = dynamic_pointer_cast<MXF>(j->asset_ref().asset()); + if (mxf && mxf->encrypted()) { + encrypted.push_back(j->asset_ref().id()); } } } @@ -1242,7 +1237,7 @@ dcp::verify ( notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::INVALID_INTRINSIC_DURATION, i->id()}); } auto file_asset = dynamic_pointer_cast<ReelFileAsset>(i); - if (dynamic_pointer_cast<ReelEncryptableAsset>(i) && !file_asset->hash()) { + if (i->encryptable() && !file_asset->hash()) { notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISSING_HASH, i->id()}); } } |
