Fix erroneous reports of unresolved assets when checking OV/VF pairs.
[libdcp.git] / src / dcp.cc
index 69875235271717f6853f910d8acad755e314ddb9..2011f04e52cdb515af362abc8939268d3c8d9fa1 100644 (file)
@@ -194,9 +194,10 @@ DCP::read (bool keep_going, ReadErrors* errors, bool ignore_incorrect_picture_mx
                           claims to come from ClipsterDCI 5.10.0.5.
                        */
                        survivable_error (keep_going, errors, EmptyAssetPathError(i->first));
+                       continue;
                }
 
-               if (i->second.empty() || !boost::filesystem::exists(path)) {
+               if (!boost::filesystem::exists(path)) {
                        survivable_error (keep_going, errors, MissingAssetError (path));
                        continue;
                }
@@ -210,7 +211,12 @@ DCP::read (bool keep_going, ReadErrors* errors, bool ignore_incorrect_picture_mx
                        }
                }
 
-               DCP_ASSERT (pkl_type);
+               if (!pkl_type) {
+                       /* This asset is in the ASSETMAP but not mentioned in any PKL so we don't
+                        * need to worry about it.
+                        */
+                       continue;
+               }
 
                if (*pkl_type == CPL::static_pkl_type(*_standard) || *pkl_type == InteropSubtitleAsset::static_pkl_type(*_standard)) {
                        xmlpp::DomParser* p = new xmlpp::DomParser;