From 0e8a1ab7c41756115f44229053e1e7024530fb32 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 10 Nov 2019 22:51:55 +0100 Subject: Make DecoderPart::_position an optional. --- src/lib/ffmpeg_decoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 62d4d2655..04aa022b2 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -126,7 +126,7 @@ FFmpegDecoder::flush () if (video) { double const vfr = _ffmpeg_content->video_frame_rate().get(); Frame const f = full_length.frames_round (vfr); - Frame v = video->position(film()).frames_round(vfr) + 1; + Frame v = video->position(film()).get_value_or(ContentTime()).frames_round(vfr) + 1; while (v < f) { video->emit (film(), shared_ptr (new RawImageProxy (_black_image)), v); ++v; -- cgit v1.2.3