diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-29 16:11:39 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-01 23:43:00 +0200 |
| commit | ad1b660b6b3132952bdc2d4e5682fa164c82dd37 (patch) | |
| tree | e18055c22afbfd3fbdc20d863c6fba63724125cc | |
| parent | b3759f9f0bc6f00a6e4492b013f30538a3e9b9ec (diff) | |
INVALID_TIMED_TEXT_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, 5 insertions, 5 deletions
diff --git a/src/verify.cc b/src/verify.cc index 511436d6..72d2f0ac 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -709,7 +709,7 @@ verify_smpte_timed_text_asset ( auto const size = filesystem::file_size(asset->file().get()); if (size > 115 * 1024 * 1024) { - context.add_note(VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES, fmt::to_string(size), *asset->file()); + context.add_note(VerificationNote(VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES, *asset->file()).set_size_in_bytes(size)); } /* XXX: I'm not sure what Bv2.1_7.2.1 means when it says "the font resource shall not be larger than 10MB" @@ -2026,7 +2026,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str 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.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()); + return compose("The size %1 of the timed text asset %2 is larger than the 115MB maximum.", *note.size_in_bytes(), filename()); case VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES: return compose("The size %1 of the fonts in timed text asset %2 is larger than the 10MB maximum.", note.note().get(), filename()); case VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE: diff --git a/src/verify.h b/src/verify.h index 67763eb9..1cb6acc0 100644 --- a/src/verify.h +++ b/src/verify.h @@ -237,7 +237,7 @@ public: */ INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, /** Any timed text asset's total files is larger than 115MB [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 */ INVALID_TIMED_TEXT_SIZE_IN_BYTES, diff --git a/test/verify_test.cc b/test/verify_test.cc index 8a79bb95..63cb0bb3 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -2187,8 +2187,8 @@ verify_timed_text_asset_too_large (string name) note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), VN( - VC::INVALID_TIMED_TEXT_SIZE_IN_BYTES, string("121698284"), canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()), + VC::INVALID_TIMED_TEXT_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(121698284), VN( VC::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, "121634816", |
