diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-29 15:51:18 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-01 23:43:00 +0200 |
| commit | b3759f9f0bc6f00a6e4492b013f30538a3e9b9ec (patch) | |
| tree | adb4ebb5113ea4fd601874e2fa4fe8518aead687 | |
| parent | b65880e549432818f750675a4f518eb96d1f486e (diff) | |
INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES: note -> size_in_bytes.
| -rw-r--r-- | src/verify.cc | 4 | ||||
| -rw-r--r-- | src/verify.h | 2 | ||||
| -rw-r--r-- | test/verify_test.cc | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/verify.cc b/src/verify.cc index 30b3ce43..511436d6 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -856,7 +856,7 @@ verify_closed_caption_asset ( if (auto raw_xml = asset->raw_xml()) { validate_xml(context, *raw_xml); if (raw_xml->size() > 256 * 1024) { - context.add_note(VerificationNote::Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, fmt::to_string(raw_xml->size()), *asset->file()); + context.add_note(VerificationNote(VerificationNote::Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, *asset->file()).set_size_in_bytes(raw_xml->size())); } } else { context.add_note(VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED); @@ -2024,7 +2024,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str case VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D: return process_string("3D 4K DCPs are not allowed."); case VerificationNote::Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES: - return compose("The size %1 of the closed caption asset %2 is larger than the 256KB maximum.", note.note().get(), filename()); + return compose("The size %1 of the closed caption asset %2 is larger than the 256KB maximum.", *note.size_in_bytes(), filename()); case VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES: return compose("The size %1 of the timed text asset %2 is larger than the 115MB maximum.", note.note().get(), filename()); case VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES: diff --git a/src/verify.h b/src/verify.h index cab264db..67763eb9 100644 --- a/src/verify.h +++ b/src/verify.h @@ -231,7 +231,7 @@ public: */ INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D, /** A closed caption's XML file is larger than 256KB [Bv2.1_7.2.1] - * note contains the invalid size in bytes + * size_in_bytes contains the invalid size in bytes * file contains the asset filename * reel_index contains the reel index (starting from 0) */ diff --git a/test/verify_test.cc b/test/verify_test.cc index bef3a871..8a79bb95 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -2136,7 +2136,9 @@ BOOST_AUTO_TEST_CASE (verify_invalid_closed_caption_xml_size_in_bytes) note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), VN(VC::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()), - VN(VC::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, string("419371"), canonical(dir / "subs.mxf")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()), + VN( + VC::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, canonical(dir / "subs.mxf") + ).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()).set_size_in_bytes(419371), VN(VC::INVALID_SUBTITLE_FIRST_TEXT_TIME).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()), VN(VC::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id()) }); |
