[FFmpeg-devel] [PATCH 3/4] lavfi: remove needs_fifo.
Nicolas George
george at nsup.org
Wed Aug 12 20:25:57 EEST 2020
Signed-off-by: Nicolas George <george at nsup.org>
---
libavfilter/avfilter.h | 3 +--
libavfilter/avfiltergraph.c | 40 -------------------------------------
libavfilter/internal.h | 8 --------
3 files changed, 1 insertion(+), 50 deletions(-)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 49b4f7a939..fcab450f47 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -493,8 +493,7 @@ struct AVFilterLink {
/**
* Audio only, the destination filter sets this to a non-zero value to
* request that buffers with the given number of samples should be sent to
- * it. AVFilterPad.needs_fifo must also be set on the corresponding input
- * pad.
+ * it.
* Last buffer before EOF will be padded with silence.
*/
int request_samples;
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 2fe4f0b0f9..c62750d654 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -1228,52 +1228,12 @@ static int graph_config_pointers(AVFilterGraph *graph,
return 0;
}
-static int graph_insert_fifos(AVFilterGraph *graph, AVClass *log_ctx)
-{
- AVFilterContext *f;
- int i, j, ret;
- int fifo_count = 0;
-
- for (i = 0; i < graph->nb_filters; i++) {
- f = graph->filters[i];
-
- for (j = 0; j < f->nb_inputs; j++) {
- AVFilterLink *link = f->inputs[j];
- AVFilterContext *fifo_ctx;
- const AVFilter *fifo;
- char name[32];
-
- if (!link->dstpad->needs_fifo)
- continue;
-
- fifo = f->inputs[j]->type == AVMEDIA_TYPE_VIDEO ?
- avfilter_get_by_name("fifo") :
- avfilter_get_by_name("afifo");
-
- snprintf(name, sizeof(name), "auto_fifo_%d", fifo_count++);
-
- ret = avfilter_graph_create_filter(&fifo_ctx, fifo, name, NULL,
- NULL, graph);
- if (ret < 0)
- return ret;
-
- ret = avfilter_insert_filter(link, fifo_ctx, 0, 0);
- if (ret < 0)
- return ret;
- }
- }
-
- return 0;
-}
-
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
{
int ret;
if ((ret = graph_check_validity(graphctx, log_ctx)))
return ret;
- if ((ret = graph_insert_fifos(graphctx, log_ctx)) < 0)
- return ret;
if ((ret = graph_config_formats(graphctx, log_ctx)))
return ret;
if ((ret = graph_config_links(graphctx, log_ctx)))
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 6cb601f36f..cc208f8e3a 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -117,14 +117,6 @@ struct AVFilterPad {
*/
int (*config_props)(AVFilterLink *link);
- /**
- * The filter expects a fifo to be inserted on its input link,
- * typically because it has a delay.
- *
- * input pads only.
- */
- int needs_fifo;
-
/**
* The filter expects writable frames from its input link,
* duplicating data buffers if needed.
--
2.28.0
More information about the ffmpeg-devel
mailing list