Catch read errors from verify_cpl (e.g. basic failures to read a video frame). v1.8.98
authorCarl Hetherington <cth@carlh.net>
Mon, 18 Mar 2024 17:08:53 +0000 (18:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 18 Mar 2024 17:08:53 +0000 (18:08 +0100)
src/verify.cc

index 0ef4ada5c59b9add2a576e9e6596b84d410b188e..9715c020aacd089b8eee7ea87c30baaadec83471 100644 (file)
@@ -1904,16 +1904,20 @@ dcp::verify (
                }
 
                for (auto cpl: dcp->cpls()) {
-                       verify_cpl(
-                               dcp,
-                               cpl,
-                               stage,
-                               *xsd_dtd_directory,
-                               progress,
-                               options,
-                               notes,
-                               state
-                               );
+                       try {
+                               verify_cpl(
+                                       dcp,
+                                       cpl,
+                                       stage,
+                                       *xsd_dtd_directory,
+                                       progress,
+                                       options,
+                                       notes,
+                                       state
+                                       );
+                       } catch (ReadError& e) {
+                               notes.push_back({VerificationNote::Type::ERROR, VerificationNote::Code::FAILED_READ, string(e.what())});
+                       }
                }
 
                for (auto pkl: dcp->pkls()) {