summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-10 22:59:39 +0100
committerCarl Hetherington <cth@carlh.net>2020-02-15 01:53:19 +0100
commitc259c459f5d326e7c42806b41de06c71ad4a3ad8 (patch)
treea3a976edbefb9638c11c5fa477e81efde60234c8 /src/lib/ffmpeg_decoder.cc
parent9482a41238c370e093c896145b844dac0b221345 (diff)
Don't trust video timestamps from FFmpegDecoder.
Back-ported from 98342fb53eae4d32440fc69c279f2ca0fef785b5 in v2.15.x.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc2
1 files changed, 1 insertions, 1 deletions
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<const ImageProxy> (new RawImageProxy (_black_image)), v);
++v;