summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fps.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2022-02-19 16:14:03 +0100
committerNicolas George <george@nsup.org>2022-02-20 12:38:52 +0100
commit01440e258827f77990d918bfeb77cb613bc3733a (patch)
tree27baec2607c965529fa539652d6095a01f518fe3 /libavfilter/vf_fps.c
parent531d09fb2d6bddb968dbef1fbb8b351aed85cbfa (diff)
lavfi/vf_fps: check flow before sending more frames
Analyzed by Paul B Mahol <onemda@gmail.com>. Fixes OOM in #9081.
Diffstat (limited to 'libavfilter/vf_fps.c')
-rw-r--r--libavfilter/vf_fps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 99e679441e..0e5a1fec35 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -351,7 +351,7 @@ static int activate(AVFilterContext *ctx)
if (s->frames_count > 0) {
ret = write_frame(ctx, s, outlink, &again);
/* Couldn't generate a frame, so schedule us to perform another step */
- if (again)
+ if (again && ff_inoutlink_check_flow(inlink, outlink))
ff_filter_set_ready(ctx, 100);
return ret;
}