diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-04 17:46:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-04 18:52:14 +0100 |
commit | 7f02fcd91774818ad36cafde44aefe8924aa15b7 (patch) | |
tree | f4b4c777d71d0914f5dd39e7739f598c4d949992 /libavfilter/vf_fps.c | |
parent | b11994593ae4c3856db735800f24d38293838759 (diff) | |
download | ffmpeg-7f02fcd91774818ad36cafde44aefe8924aa15b7.tar.gz |
avfilter/vf_fps: Do not drop a random subset of frames
This also avoids droping the frame which is closest to the target timestamp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fps.c')
-rw-r--r-- | libavfilter/vf_fps.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index a38633d50a..25dd83123a 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -214,17 +214,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) if (delta < 1) { /* drop the frame and everything buffered except the first */ - AVFrame *tmp; int drop = av_fifo_size(s->fifo)/sizeof(AVFrame*); av_log(ctx, AV_LOG_DEBUG, "Dropping %d frame(s).\n", drop); s->drop += drop; - av_fifo_generic_read(s->fifo, &tmp, sizeof(tmp), NULL); flush_fifo(s->fifo); - ret = write_to_fifo(s->fifo, tmp); + ret = write_to_fifo(s->fifo, buf); - av_frame_free(&buf); return ret; } |