diff options
author | Nicolas George <george@nsup.org> | 2022-02-19 16:14:03 +0100 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2022-02-20 12:38:52 +0100 |
commit | 01440e258827f77990d918bfeb77cb613bc3733a (patch) | |
tree | 27baec2607c965529fa539652d6095a01f518fe3 /libavfilter/vf_fps.c | |
parent | 531d09fb2d6bddb968dbef1fbb8b351aed85cbfa (diff) | |
download | ffmpeg-01440e258827f77990d918bfeb77cb613bc3733a.tar.gz |
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.c | 2 |
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; } |