From 16557887127256fb1e491702375e7ea7b3940924 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Wed, 30 Sep 2015 16:11:57 +0200 Subject: lavfi: make request_frame() non-recursive. Instead of calling the input filter request_frame() method, ff_request_frame() now marks the link and returns immediately. buffersink is changed to activate the marked filters until a frame is obtained. --- libavfilter/buffersink.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavfilter/buffersink.c') diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 7a19df2c3a..2feb56dee9 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -140,6 +140,11 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr return AVERROR(EAGAIN); if ((ret = ff_request_frame(inlink)) < 0) return ret; + while (inlink->frame_wanted_out) { + ret = ff_filter_graph_run_once(ctx->graph); + if (ret < 0) + return ret; + } } if (flags & AV_BUFFERSINK_FLAG_PEEK) { -- cgit v1.2.3