Fix finding of CPLs to make KDMs for, broken by recent libdcp additions.
authorCarl Hetherington <cth@carlh.net>
Thu, 18 Jun 2020 10:54:07 +0000 (12:54 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 18 Jun 2020 10:54:07 +0000 (12:54 +0200)
src/lib/types.cc

index 9519b309729db5ed323ccdd7bcd8ef0ad93a9d1d..d2df7f1a8332219714a927bf15317a155f660420 100644 (file)
@@ -194,10 +194,14 @@ CPLSummary::CPLSummary (boost::filesystem::path p)
        : dcp_directory (p.leaf().string())
 {
        dcp::DCP dcp (p);
+
        list<dcp::VerificationNote> notes;
        dcp.read (&notes);
-       if (!notes.empty()) {
-               throw dcp::ReadError(dcp::note_to_string(notes.front()));
+       BOOST_FOREACH (dcp::VerificationNote i, notes) {
+               if (i.code() != dcp::VerificationNote::EXTERNAL_ASSET) {
+                       /* It's not just a warning about this DCP being a VF */
+                       throw dcp::ReadError(dcp::note_to_string(i));
+               }
        }
 
        cpl_id = dcp.cpls().front()->id();