From 02aa0701ae0dc2def8db640c9e3c06dc1b5de70c Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sun, 3 Jan 2016 15:44:42 +0100 Subject: lavfi: make filter_frame non-recursive. A lot of changes happen at the same time: - Add a framequeue fifo to AVFilterLink. - split AVFilterLink.status into status_in and status_out: requires changes to the few filters and programs that use it directly (f_interleave, split, filtfmts). - Add a field ready to AVFilterContext, marking when the filter is ready and its activation priority. - Add flags to mark blocked links. - Change ff_filter_frame() to enqueue the frame. - Change all filtering functions to update the ready field and the blocked flags. - Update ff_filter_graph_run_once() to use the ready field. - buffersrc: always push the frame immediately. --- libavfilter/buffersrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavfilter/buffersrc.c') diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 9294811d36..1314397a32 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -184,6 +184,7 @@ static int av_buffersrc_add_frame_internal(AVFilterContext *ctx, if (!frame) { s->eof = 1; + ff_avfilter_link_set_in_status(ctx->outputs[0], AVERROR_EOF, AV_NOPTS_VALUE); return 0; } else if (s->eof) return AVERROR(EINVAL); @@ -235,9 +236,8 @@ static int av_buffersrc_add_frame_internal(AVFilterContext *ctx, return ret; } - if ((flags & AV_BUFFERSRC_FLAG_PUSH)) - if ((ret = ctx->output_pads[0].request_frame(ctx->outputs[0])) < 0) - return ret; + if ((ret = ctx->output_pads[0].request_frame(ctx->outputs[0])) < 0) + return ret; return 0; } -- cgit v1.2.3