summaryrefslogtreecommitdiff
path: root/src/verify_j2k.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-12-26 00:42:28 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-03 21:26:17 +0100
commit5d3d4fbd355d8d422a4ac17f93d57ab8ef0a22ee (patch)
tree25c871e922752501f2c0245d56c4802413a4cefd /src/verify_j2k.cc
parent07314aa75683a7d6d34069514a8bb377bd2def77 (diff)
Report every frame (with index) that has a JPEG2000 codestream error (DoM #2698).
Diffstat (limited to 'src/verify_j2k.cc')
-rw-r--r--src/verify_j2k.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/verify_j2k.cc b/src/verify_j2k.cc
index b9158849..47ee151c 100644
--- a/src/verify_j2k.cc
+++ b/src/verify_j2k.cc
@@ -65,7 +65,7 @@ public:
void
-dcp::verify_j2k(shared_ptr<const Data> j2k, int frame_index, int frame_rate, vector<VerificationNote>& notes)
+dcp::verify_j2k(shared_ptr<const Data> j2k, int start_index, int frame_index, int frame_rate, vector<VerificationNote>& notes)
{
/* See ITU-T T800 (visible on https://github.com/Ymagis/ClairMeta/issues/130) */
unsigned int const max_tile_part_size = std::floor(200e6 / (8 * frame_rate));
@@ -357,7 +357,10 @@ dcp::verify_j2k(shared_ptr<const Data> j2k, int frame_index, int frame_rate, vec
}
catch (InvalidCodestream const& e)
{
- notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::INVALID_JPEG2000_CODESTREAM, string(e.what()) });
+ VerificationNote note({VerificationNote::Type::ERROR, VerificationNote::Code::INVALID_JPEG2000_CODESTREAM, string(e.what())});
+ note.set_frame(start_index + frame_index);
+ note.set_frame_rate(frame_rate);
+ notes.push_back(note);
}
}