From: Carl Hetherington Date: Fri, 6 Dec 2019 21:45:55 +0000 (+0100) Subject: More tests. X-Git-Tag: v1.8.0~408 X-Git-Url: https://main.carlh.net/gitweb/?p=libdcp.git;a=commitdiff_plain;h=990729f84f430dfa2788270474784011dc1f12e1 More tests. --- 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 directories, function 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(" 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 is malformed"))); + } + } /* Check that the CPL's hash corresponds to the PKL */ BOOST_FOREACH (shared_ptr i, dcp->pkls()) {