[FFmpeg-devel] [PATCH] avfilter/vf_fps: only give frame as soon as possible if really requested by output
Paul B Mahol
onemda at gmail.com
Sat Feb 19 03:00:25 EET 2022
Fixes OOM in #9081.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vf_fps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 99e679441e..1a68d519fb 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_outlink_frame_wanted(outlink))
ff_filter_set_ready(ctx, 100);
return ret;
}
--
2.33.0
More information about the ffmpeg-devel
mailing list