Fix duplicate frames when padding.
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Feb 2018 00:29:44 +0000 (00:29 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 23 Feb 2018 00:58:02 +0000 (00:58 +0000)
src/lib/ffmpeg_decoder.cc
src/lib/video_decoder.h

index 2f46f17c649c21b32a97ebcd3936bbec5d612750..a5b6af7de51497550c8c1d450d20f9d04241ad68 100644 (file)
@@ -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;
index 959ff7ac70c54ad7be8cf1f856812ee88d8a6bdf..3fc30cf9dab3b9c897cb99844c645058a5e55eef 100644 (file)
@@ -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;