summaryrefslogtreecommitdiff
path: root/src/lib/image_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-21 10:47:38 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-21 18:48:53 +0100
commit3ffd0163026be24e5373e0674c3301ed37546e44 (patch)
tree918e6de08fb1efff2098148295fa60a614102c8e /src/lib/image_decoder.cc
parenta9b1c1cb65e1902a64430977cf698054e131a6f4 (diff)
Make DCPExaminer::size() optional and deal with the consequences.v2.16.78
This means we can fix the case of a VF having no known size in a nice way, in turn fixing problems caused by the fix to #2775.
Diffstat (limited to 'src/lib/image_decoder.cc')
-rw-r--r--src/lib/image_decoder.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc
index 26a9ad624..ce5c8757f 100644
--- a/src/lib/image_decoder.cc
+++ b/src/lib/image_decoder.cc
@@ -73,7 +73,9 @@ ImageDecoder::pass ()
/* We can't extract image size from a JPEG2000 codestream without decoding it,
so pass in the image content's size here.
*/
- _image = make_shared<J2KImageProxy>(path, _image_content->video->size(), pf);
+ auto size = _image_content->video->size();
+ DCPOMATIC_ASSERT(size);
+ _image = make_shared<J2KImageProxy>(path, *size, pf);
} else {
_image = make_shared<FFmpegImageProxy>(path);
}