diff options
author | Nicolas George <george@nsup.org> | 2016-01-03 15:44:42 +0100 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2016-12-18 10:38:52 +0100 |
commit | 02aa0701ae0dc2def8db640c9e3c06dc1b5de70c (patch) | |
tree | d36bc5207cb7b5a5cbfd1a8ac9c1dbae90255020 /libavfilter/f_interleave.c | |
parent | 62b11db0a08cbb8c338e413a0d1707a8c81ae24e (diff) |
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.
Diffstat (limited to 'libavfilter/f_interleave.c')
-rw-r--r-- | libavfilter/f_interleave.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c index 422f2bfb29..b9192e9b14 100644 --- a/libavfilter/f_interleave.c +++ b/libavfilter/f_interleave.c @@ -26,6 +26,10 @@ #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/opt.h" + +#define FF_INTERNAL_FIELDS 1 +#include "framequeue.h" + #include "avfilter.h" #include "bufferqueue.h" #include "formats.h" @@ -59,7 +63,7 @@ inline static int push_frame(AVFilterContext *ctx) for (i = 0; i < ctx->nb_inputs; i++) { struct FFBufQueue *q = &s->queues[i]; - if (!q->available && !ctx->inputs[i]->status) + if (!q->available && !ctx->inputs[i]->status_out) return 0; if (q->available) { frame = ff_bufqueue_peek(q, 0); @@ -190,7 +194,7 @@ static int request_frame(AVFilterLink *outlink) int i, ret; for (i = 0; i < ctx->nb_inputs; i++) { - if (!s->queues[i].available && !ctx->inputs[i]->status) { + if (!s->queues[i].available && !ctx->inputs[i]->status_out) { ret = ff_request_frame(ctx->inputs[i]); if (ret != AVERROR_EOF) return ret; |