diff options
author | Marton Balint <cus@passwd.hu> | 2020-12-20 19:32:56 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-12-30 23:47:53 +0100 |
commit | ed735e657704371753aa2e087ac7cfd77db48f78 (patch) | |
tree | 16a220d32c67f56c56d329b859c8e72826832ea0 | |
parent | 8f3741a5e39f492a499121f14251e94edf398717 (diff) | |
download | ffmpeg-ed735e657704371753aa2e087ac7cfd77db48f78.tar.gz |
avfilter/vf_framerate: fix infinite loop with 1-frame input
Fixes infinite loop in:
ffmpeg -f lavfi -i testsrc=d=0.04 -vf framerate=50 -f null none
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 6d3b70c27ef1639784fdb3382e5a06b1afa3fe3e)
-rw-r--r-- | libavfilter/vf_framerate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index 6c8d01c94b..f5085705a4 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -170,7 +170,9 @@ static int process_work_frame(AVFilterContext *ctx) return 0; if (!s->f0) { - s->work = av_frame_clone(s->f1); + av_assert1(s->flush); + s->work = s->f1; + s->f1 = NULL; } else { if (work_pts >= s->pts1 + s->delta && s->flush) return 0; |