summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-23 00:29:44 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-23 00:29:44 +0000
commit5a03c6b8e5d088126378b2dd3aef93fbc0216d06 (patch)
tree54884cf468cad576075133e582d8aecbe55140a3 /src/lib
parent711e6ed0a3a7d5bd12500674ebb3aa81d6c66d26 (diff)
Fix duplicate frames when padding.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffmpeg_decoder.cc2
-rw-r--r--src/lib/video_decoder.h1
2 files changed, 2 insertions, 1 deletions
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<const ImageProxy> (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<void (ContentVideo)> Data;
private:
+ /** Time of last thing to be emitted */
boost::shared_ptr<const Content> _content;
boost::optional<Frame> _last_emitted;
ContentTime _position;