Make DCPExaminer::size() optional and deal with the consequences.
[dcpomatic.git] / src / lib / image_decoder.cc
index 26a9ad624b31fb168633c7aa3f721f44edf403db..ce5c8757f7f636adc40cdf9f5dd23e5daf3d10dc 100644 (file)
@@ -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);
                }