From 1d4c7f065389981ba145b89a0a224cb986d8eb5b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 23 Feb 2018 00:29:44 +0000 Subject: [PATCH] Fix duplicate frames when padding. --- src/lib/ffmpeg_decoder.cc | 2 +- src/lib/video_decoder.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 2f46f17c6..a5b6af7de 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -129,7 +129,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().frames_round (vfr); + Frame v = video->position().frames_round (vfr) + 1; while (v < f) { video->emit (shared_ptr (new RawImageProxy (_black_image)), v); ++v; diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h index 959ff7ac7..3fc30cf9d 100644 --- a/src/lib/video_decoder.h +++ b/src/lib/video_decoder.h @@ -63,6 +63,7 @@ public: boost::signals2::signal Data; private: + /** Time of last thing to be emitted */ boost::shared_ptr _content; boost::optional _last_emitted; ContentTime _position; -- 2.30.2