summaryrefslogtreecommitdiff
path: root/src/dcp.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-06-26 01:45:17 +0200
committerCarl Hetherington <cth@carlh.net>2023-06-27 00:09:54 +0200
commitc72e832423ceb81f30e8ca19bfeb87fca26298c1 (patch)
tree7981151787cad7ea2365cc302aec587079dd7ffe /src/dcp.cc
parent54617cea2d186bd62eb44b07292b8722fe59ed4e (diff)
Add verifier check for the actual asset file's ID not being the same as the one in the asset map.
Diffstat (limited to 'src/dcp.cc')
-rw-r--r--src/dcp.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index 7fa84798..0d0dc690 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -253,7 +253,11 @@ DCP::read (vector<dcp::VerificationNote>* notes, bool ignore_incorrect_picture_m
) {
bool found_threed_marked_as_twod = false;
- other_assets.push_back (asset_factory(path, ignore_incorrect_picture_mxf_type, &found_threed_marked_as_twod));
+ auto asset = asset_factory(path, ignore_incorrect_picture_mxf_type, &found_threed_marked_as_twod);
+ if (asset->id() != id) {
+ notes->push_back(VerificationNote(VerificationNote::Type::ERROR, VerificationNote::Code::MISMATCHED_ASSET_MAP_ID).set_id(id).set_other_id(asset->id()));
+ }
+ other_assets.push_back(asset);
if (found_threed_marked_as_twod && notes) {
notes->push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::THREED_ASSET_MARKED_AS_TWOD, path});
}