Skip to content

Commit

Permalink
lavfi/vf_fps: check flow before sending more frames
Browse files Browse the repository at this point in the history
Analyzed by Paul B Mahol <onemda@gmail.com>.

Fixes OOM in #9081.
  • Loading branch information
Cigaes committed Feb 20, 2022
1 parent 531d09f commit 01440e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavfilter/vf_fps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 01440e2

Please sign in to comment.