diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-12-06 22:45:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-22 01:21:00 +0100 |
| commit | 990729f84f430dfa2788270474784011dc1f12e1 (patch) | |
| tree | 94ea0df62d6b05acd5a80a569ec3399560f26d92 /src | |
| parent | 2f20ff18f773dd0cf8339a6b290143c60eafe1f9 (diff) | |
More tests.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc index 6611b7b3..bdbf4071 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -170,9 +170,16 @@ dcp::verify (vector<boost::filesystem::path> directories, function<void (string, if (!good_date(cpl_doc.string_child("IssueDate"))) { notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::BAD_DATE, string("CPL <IssueDate> is malformed"))); } + /* ContentVersion/Id */ if (cpl->standard() && cpl->standard().get() == SMPTE && !good_urn_uuid(cpl_doc.node_child("ContentVersion")->string_child("Id"))) { notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::BAD_URN_UUID, string("<ContentVersion> <Id> is malformed."))); } + /* Reel/Id */ + BOOST_FOREACH (cxml::ConstNodePtr i, cpl_doc.node_child("ReelList")->node_children("Reel")) { + if (!good_urn_uuid(i->string_child("Id"))) { + notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::BAD_URN_UUID, string("Reel <Id> is malformed"))); + } + } /* Check that the CPL's hash corresponds to the PKL */ BOOST_FOREACH (shared_ptr<PKL> i, dcp->pkls()) { |
