From 03257d7e08986d1333190f447e5d64c609ade981 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 18 Mar 2024 18:08:53 +0100 Subject: Catch read errors from verify_cpl (e.g. basic failures to read a video frame). --- src/verify.cc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index 0ef4ada5..9715c020 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -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()) { -- cgit v1.2.3