diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-29 23:51:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-01 23:43:00 +0200 |
| commit | 0c3fc9e8b33494a920c89da935a100fa7307939c (patch) | |
| tree | 15c72443014ffcc1d3dccbfc3563e9e27f56d491 | |
| parent | bcb1158dce040f73aef636f0a61e7ca63988711c (diff) | |
INVALID_JPEG2000_CODESTREAM: note -> error.
| -rw-r--r-- | src/verify.cc | 2 | ||||
| -rw-r--r-- | src/verify.h | 2 | ||||
| -rw-r--r-- | src/verify_j2k.cc | 2 | ||||
| -rw-r--r-- | test/verify_test.cc | 12 |
4 files changed, 7 insertions, 11 deletions
diff --git a/src/verify.cc b/src/verify.cc index 4e40cfa5..abc447de 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -2122,7 +2122,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str "Frame %1 (timecode %2) has an invalid JPEG2000 codestream (%3).", note.frame().get(), dcp::Time(note.frame().get(), note.frame_rate()->as_float(), note.frame_rate()->numerator).as_string(dcp::Standard::SMPTE), - note.note().get() + *note.error() ); case VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K: return compose("The JPEG2000 codestream uses %1 guard bits in a 2K image instead of 1.", note.note().get()); diff --git a/src/verify.h b/src/verify.h index 58069feb..16151bd1 100644 --- a/src/verify.h +++ b/src/verify.h @@ -401,7 +401,7 @@ public: PARTIALLY_ENCRYPTED, /** General error during JPEG2000 codestream verification * frame contains the frame index (counted from 0) - * note contains details + * error contains details * reel_index contains the reel index (starting from 0) */ INVALID_JPEG2000_CODESTREAM, diff --git a/src/verify_j2k.cc b/src/verify_j2k.cc index 52e4dbf7..7ba349a5 100644 --- a/src/verify_j2k.cc +++ b/src/verify_j2k.cc @@ -366,7 +366,7 @@ dcp::verify_j2k(shared_ptr<const Data> j2k, int start_index, int frame_index, in } catch (InvalidCodestream const& e) { - VerificationNote note({VerificationNote::Code::INVALID_JPEG2000_CODESTREAM, string(e.what())}); + VerificationNote note(VerificationNote(VerificationNote::Code::INVALID_JPEG2000_CODESTREAM).set_error(e.what())); note.set_frame(start_index + frame_index); note.set_frame_rate(dcp::Fraction(frame_rate, 1)); notes.push_back(note); diff --git a/test/verify_test.cc b/test/verify_test.cc index cd28a109..2ba2dbb9 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -1120,10 +1120,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_picture_frame_size_in_bytes) for (auto i = 0; i < 24; ++i) { expected.push_back( - VN( - VC::INVALID_JPEG2000_CODESTREAM, - string("missing marker start byte") - ).set_frame(i).set_frame_rate(dcp::Fraction(24, 1)).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(picture_id) + VN(VC::INVALID_JPEG2000_CODESTREAM).set_frame(i).set_frame_rate(dcp::Fraction(24, 1)) + .set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(picture_id).set_error("missing marker start byte") ); } @@ -1177,10 +1175,8 @@ BOOST_AUTO_TEST_CASE (verify_nearly_invalid_picture_frame_size_in_bytes) for (auto i = 0; i < 24; ++i) { expected.push_back( - VN( - VC::INVALID_JPEG2000_CODESTREAM, - string("missing marker start byte") - ).set_frame(i).set_frame_rate(dcp::Fraction(24, 1)).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(picture_id) + VN(VC::INVALID_JPEG2000_CODESTREAM).set_frame(i).set_frame_rate(dcp::Fraction(24, 1)) + .set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(picture_id).set_error("missing marker start byte") ); } |
