[FFmpeg-cvslog] lavfi: remove needs_fifo.

Nicolas George git at videolan.org
Thu Aug 20 20:09:49 EEST 2020


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Wed Aug 12 19:13:37 2020 +0200| [4ca1fb9d2a91757c8c4c34dd456abf340e3f765f] | committer: Nicolas George

lavfi: remove needs_fifo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ca1fb9d2a91757c8c4c34dd456abf340e3f765f
---

 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 a149f8fb6d..6c2b6d03fa 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -1226,52 +1226,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.



More information about the ffmpeg-cvslog mailing list