From c259c459f5d326e7c42806b41de06c71ad4a3ad8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 10 Nov 2019 22:59:39 +0100 Subject: Don't trust video timestamps from FFmpegDecoder. Back-ported from 98342fb53eae4d32440fc69c279f2ca0fef785b5 in v2.15.x. --- 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 0f39f7727..fd248c39a 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