Make DCPExaminer::size() optional and deal with the consequences.
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 0d43156c0cdefd3fcd83842c47a0b8ef27bf916b..7f7a078638b540ba81bbbe38c5ad260970232fa0 100644 (file)
@@ -828,11 +828,14 @@ FFmpegDecoder::process_ass_subtitle (string ass, ContentTime from)
        }
 
        sub::RawSubtitle base;
+       auto video_size = _ffmpeg_content->video->size();
+       DCPOMATIC_ASSERT(video_size);
+
        auto raw = sub::SSAReader::parse_line (
                base,
                text,
-               _ffmpeg_content->video->size().width,
-               _ffmpeg_content->video->size().height,
+               video_size->width,
+               video_size->height,
                sub::Colour(1, 1, 1)
                );