diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-20 23:15:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-20 23:15:11 +0100 |
| commit | d27d0f88a526cfe55e6018f9f32d54d5b61fc634 (patch) | |
| tree | 9645e24258c90fe329dbac08e8ba670b07fe97a8 /src | |
| parent | 8ba4029ad997f638dedced7a24d441450d55b589 (diff) | |
| parent | 03257d7e08986d1333190f447e5d64c609ade981 (diff) | |
Merge tag 'v1.8.98' into v1.9.xv1.9.3
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp_time.cc | 5 | ||||
| -rw-r--r-- | src/verify.cc | 24 |
2 files changed, 17 insertions, 12 deletions
diff --git a/src/dcp_time.cc b/src/dcp_time.cc index e21eaf27..f08f2b1c 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -147,7 +147,8 @@ Time::Time (string time, optional<int> tcr_) } } else { - /* SMPTE: HH:MM:SS:EE */ + /* SMPTE: HH:MM:SS:EE[E]. + * It seems like there can be any number of E digits but let's just allow 2 or 3 */ split (b, time, is_any_of (":")); if (b.size() != 4) { boost::throw_exception (ReadError (String::compose ("unrecognised time specification %1; does not have 4 parts", time))); @@ -159,7 +160,7 @@ Time::Time (string time, optional<int> tcr_) boost::throw_exception (ReadError (String::compose ("unrecognised time specification %1; %2 has bad length", time, b[2]))); } s = raw_convert<int> (b[2]); - if (b[3].empty() || b[3].length() > 2) { + if (b[3].empty() || b[3].length() > 3) { boost::throw_exception (ReadError (String::compose ("unrecognised time specification %1; %2 has bad length", time, b[3]))); } e = raw_convert<int> (b[3]); 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()) { |
