From c43a7ecad997fc527af34b952334f3d030709a1b Mon Sep 17 00:00:00 2001
From: Anton Khirnov <anton@khirnov.net>
Date: Wed, 13 Mar 2013 08:26:39 +0100
Subject: [PATCH] lavfi: remove now unused args parameter from AVFilter.init

---
 libavfilter/af_aformat.c      | 2 +-
 libavfilter/af_amix.c         | 2 +-
 libavfilter/af_asyncts.c      | 2 +-
 libavfilter/af_channelmap.c   | 2 +-
 libavfilter/af_channelsplit.c | 2 +-
 libavfilter/af_join.c         | 2 +-
 libavfilter/af_volume.c       | 2 +-
 libavfilter/avfilter.c        | 2 +-
 libavfilter/avfilter.h        | 6 +++---
 libavfilter/buffersrc.c       | 4 ++--
 libavfilter/fifo.c            | 2 +-
 libavfilter/split.c           | 2 +-
 libavfilter/vf_aspect.c       | 2 +-
 libavfilter/vf_boxblur.c      | 2 +-
 libavfilter/vf_cropdetect.c   | 2 +-
 libavfilter/vf_delogo.c       | 2 +-
 libavfilter/vf_drawbox.c      | 2 +-
 libavfilter/vf_drawtext.c     | 2 +-
 libavfilter/vf_fade.c         | 2 +-
 libavfilter/vf_format.c       | 2 +-
 libavfilter/vf_fps.c          | 2 +-
 libavfilter/vf_frei0r.c       | 4 ++--
 libavfilter/vf_gradfun.c      | 2 +-
 libavfilter/vf_hqdn3d.c       | 2 +-
 libavfilter/vf_libopencv.c    | 2 +-
 libavfilter/vf_lut.c          | 6 +++---
 libavfilter/vf_pad.c          | 2 +-
 libavfilter/vf_scale.c        | 2 +-
 libavfilter/vf_select.c       | 2 +-
 libavfilter/vf_setpts.c       | 2 +-
 libavfilter/vf_unsharp.c      | 2 +-
 libavfilter/vsrc_color.c      | 2 +-
 libavfilter/vsrc_movie.c      | 2 +-
 libavfilter/vsrc_testsrc.c    | 4 ++--
 34 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
index 93760e1ec79..085b4d05295 100644
--- a/libavfilter/af_aformat.c
+++ b/libavfilter/af_aformat.c
@@ -94,7 +94,7 @@ static int get_sample_rate(const char *samplerate)
     return FFMAX(ret, 0);
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     AFormatContext *s = ctx->priv;
 
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 9aa917eb903..f7f003b6b1e 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -488,7 +488,7 @@ fail:
     return ret;
 }
 
-static int init(AVFilterContext *ctx, const char *args)
+static int init(AVFilterContext *ctx)
 {
     MixContext *s = ctx->priv;
     int i;
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index 06f0af8660f..ad4e3d733b8 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -64,7 +64,7 @@ static const AVClass async_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-static int init(AVFilterContext *ctx, const char *args)
+static int init(AVFilterContext *ctx)
 {
     ASyncContext *s = ctx->priv;
 
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index d028e28e553..8ed96768abf 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -119,7 +119,7 @@ static int get_channel(char **map, uint64_t *ch, char delim)
     return 0;
 }
 
-static av_cold int channelmap_init(AVFilterContext *ctx, const char *args)
+static av_cold int channelmap_init(AVFilterContext *ctx)
 {
     ChannelMapContext *s = ctx->priv;
     int ret;
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index 31e3b0eab79..fcdc34eca00 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -53,7 +53,7 @@ static const AVClass channelsplit_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-static int init(AVFilterContext *ctx, const char *arg)
+static int init(AVFilterContext *ctx)
 {
     ChannelSplitContext *s = ctx->priv;
     int nb_channels;
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 4b60509e583..a06812ed32f 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -186,7 +186,7 @@ static int parse_maps(AVFilterContext *ctx)
     return 0;
 }
 
-static int join_init(AVFilterContext *ctx, const char *args)
+static int join_init(AVFilterContext *ctx)
 {
     JoinContext *s = ctx->priv;
     int ret, i;
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
index 32e4a2c520c..c22c283e02c 100644
--- a/libavfilter/af_volume.c
+++ b/libavfilter/af_volume.c
@@ -60,7 +60,7 @@ static const AVClass volume_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     VolumeContext *vol = ctx->priv;
 
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 59beb6d2b3a..2dbd68ffff8 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -578,7 +578,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
     }
 
     if (filter->filter->init)
-        ret = filter->filter->init(filter, args);
+        ret = filter->filter->init(filter);
     else if (filter->filter->init_dict)
         ret = filter->filter->init_dict(filter, &options);
     if (ret < 0)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 5208c2a2a3f..28d3684b14f 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -403,10 +403,10 @@ typedef struct AVFilter {
      */
 
     /**
-     * Filter initialization function. Args contains the user-supplied
-     * parameters. FIXME: maybe an AVOption-based system would be better?
+     * Filter initialization function. Called when all the options have been
+     * set.
      */
-    int (*init)(AVFilterContext *ctx, const char *args);
+    int (*init)(AVFilterContext *ctx);
 
     /**
      * Should be set instead of init by the filters that want to pass a
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index ea18c128a07..a927f26c197 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -236,7 +236,7 @@ fail:
 }
 #endif
 
-static av_cold int init_video(AVFilterContext *ctx, const char *args)
+static av_cold int init_video(AVFilterContext *ctx)
 {
     BufferSourceContext *c = ctx->priv;
 
@@ -304,7 +304,7 @@ static const AVClass abuffer_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-static av_cold int init_audio(AVFilterContext *ctx, const char *args)
+static av_cold int init_audio(AVFilterContext *ctx)
 {
     BufferSourceContext *s = ctx->priv;
     int ret = 0;
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index b34f33b27c3..ae464036c6e 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -51,7 +51,7 @@ typedef struct {
     int allocated_samples;      ///< number of samples out was allocated for
 } FifoContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     FifoContext *fifo = ctx->priv;
     fifo->last = &fifo->root;
diff --git a/libavfilter/split.c b/libavfilter/split.c
index 8284fe9a809..7e8b4cc24fd 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -39,7 +39,7 @@ typedef struct SplitContext {
     int nb_outputs;
 } SplitContext;
 
-static int split_init(AVFilterContext *ctx, const char *args)
+static int split_init(AVFilterContext *ctx)
 {
     SplitContext *s = ctx->priv;
     int i;
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 3fe371482f3..6fb2aeccab7 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -42,7 +42,7 @@ typedef struct {
 } AspectContext;
 
 #if FF_API_OLD_FILTER_OPTS
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     AspectContext *s = ctx->priv;
 
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index c69bfe5890d..75e1c9c6903 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -80,7 +80,7 @@ typedef struct {
 #define V 2
 #define A 3
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     BoxBlurContext *boxblur = ctx->priv;
 
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index 1486695a650..b5f70f097c0 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -86,7 +86,7 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i
     return total;
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     CropDetectContext *cd = ctx->priv;
 
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 0b928b13a81..ad83ef4798e 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -173,7 +173,7 @@ static int query_formats(AVFilterContext *ctx)
     return 0;
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     DelogoContext *delogo = ctx->priv;
 
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index e5311246c2d..4673a7691d9 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -44,7 +44,7 @@ typedef struct {
     int vsub, hsub;   ///< chroma subsampling
 } DrawBoxContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     DrawBoxContext *drawbox= ctx->priv;
     uint8_t rgba_color[4];
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 770fcc465f6..90625a32a26 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -280,7 +280,7 @@ error:
     return ret;
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     int err;
     DrawTextContext *dtext = ctx->priv;
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 5839c6c9e61..b1ecc64da59 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -45,7 +45,7 @@ typedef struct {
     int hsub, vsub, bpp;
 } FadeContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     FadeContext *fade = ctx->priv;
 
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index c08a707721e..2a50143b687 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -47,7 +47,7 @@ typedef struct {
 
 #define AV_PIX_FMT_NAME_MAXSIZE 32
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     FormatContext *format = ctx->priv;
     const char *cur, *sep;
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 074dd5fff52..eb201fa898d 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -64,7 +64,7 @@ static const AVClass class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     FPSContext *s = ctx->priv;
     int ret;
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index e749fe76683..452fec0d845 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -295,7 +295,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
     return 0;
 }
 
-static av_cold int filter_init(AVFilterContext *ctx, const char *args)
+static av_cold int filter_init(AVFilterContext *ctx)
 {
     Frei0rContext *frei0r = ctx->priv;
 
@@ -421,7 +421,7 @@ AVFilter avfilter_vf_frei0r = {
     .outputs   = avfilter_vf_frei0r_outputs,
 };
 
-static av_cold int source_init(AVFilterContext *ctx, const char *args)
+static av_cold int source_init(AVFilterContext *ctx)
 {
     Frei0rContext *frei0r = ctx->priv;
     AVRational frame_rate_q;
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index 4278a9d10e4..e519a374ae8 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -120,7 +120,7 @@ static void filter(GradFunContext *ctx, uint8_t *dst, uint8_t *src, int width, i
     }
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     GradFunContext *gf = ctx->priv;
 
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index aed89e37141..6f67bb0c6fe 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -181,7 +181,7 @@ static int16_t *precalc_coefs(double dist25, int depth)
 #define PARAM2_DEFAULT 3.0
 #define PARAM3_DEFAULT 6.0
 
-static int init(AVFilterContext *ctx, const char *args)
+static int init(AVFilterContext *ctx)
 {
     HQDN3DContext *hqdn3d = ctx->priv;
 
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index c5ba634cf35..44f0037764c 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -317,7 +317,7 @@ static OCVFilterEntry ocv_filter_entries[] = {
     { "smooth", sizeof(SmoothContext), smooth_init, NULL, smooth_end_frame_filter },
 };
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     OCVContext *ocv = ctx->priv;
     int i;
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 597ef40175a..7da8f3b8535 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -101,7 +101,7 @@ static const AVOption lut_options[] = {
     { NULL },
 };
 
-static int init(AVFilterContext *ctx, const char *args)
+static int init(AVFilterContext *ctx)
 {
     LutContext *lut = ctx->priv;
 
@@ -385,7 +385,7 @@ static const AVOption negate_options[] = {
     { NULL },
 };
 
-static int negate_init(AVFilterContext *ctx, const char *args)
+static int negate_init(AVFilterContext *ctx)
 {
     LutContext *lut = ctx->priv;
     int i;
@@ -401,7 +401,7 @@ static int negate_init(AVFilterContext *ctx, const char *args)
         }
     }
 
-    return init(ctx, NULL);
+    return init(ctx);
 }
 
 DEFINE_LUT_FILTER(negate, "Negate input video.", negate_init, negate_options);
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 1e283f6850d..791a561cf7e 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -112,7 +112,7 @@ typedef struct {
     int hsub, vsub;         ///< chroma subsampling values
 } PadContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     PadContext *pad = ctx->priv;
 
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index db2762e086f..7e83a3a3ac8 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -89,7 +89,7 @@ typedef struct {
     char *flags_str;
 } ScaleContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     ScaleContext *scale = ctx->priv;
 
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index ce56e33757c..c9b2b92df66 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -125,7 +125,7 @@ typedef struct {
     AVFifoBuffer *pending_frames; ///< FIFO buffer of video frames
 } SelectContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     SelectContext *select = ctx->priv;
     int ret;
diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c
index 98947a6816e..5cf90937095 100644
--- a/libavfilter/vf_setpts.c
+++ b/libavfilter/vf_setpts.c
@@ -74,7 +74,7 @@ typedef struct {
     double var_values[VAR_VARS_NB];
 } SetPTSContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     SetPTSContext *setpts = ctx->priv;
     int ret;
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 644a714ea65..0153edc563c 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -136,7 +136,7 @@ static void set_filter_param(FilterParam *fp, int msize_x, int msize_y, float am
     fp->halfscale = 1 << (fp->scalebits - 1);
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     UnsharpContext *unsharp = ctx->priv;
 
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index 793af811a7c..3834ec40648 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -54,7 +54,7 @@ typedef struct {
     char *framerate_str;
 } ColorContext;
 
-static av_cold int color_init(AVFilterContext *ctx, const char *args)
+static av_cold int color_init(AVFilterContext *ctx)
 {
     ColorContext *color = ctx->priv;
     AVRational frame_rate_q;
diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
index f431cfe7f28..615b20ec611 100644
--- a/libavfilter/vsrc_movie.c
+++ b/libavfilter/vsrc_movie.c
@@ -160,7 +160,7 @@ static int movie_init(AVFilterContext *ctx)
     return 0;
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
+static av_cold int init(AVFilterContext *ctx)
 {
     MovieContext *movie = ctx->priv;
 
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index af79b7a43bb..e958a7b0dce 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -328,7 +328,7 @@ static void test_fill_picture(AVFilterContext *ctx, AVFrame *frame)
     }
 }
 
-static av_cold int test_init(AVFilterContext *ctx, const char *args)
+static av_cold int test_init(AVFilterContext *ctx)
 {
     TestSourceContext *test = ctx->priv;
 
@@ -440,7 +440,7 @@ static void rgbtest_fill_picture(AVFilterContext *ctx, AVFrame *frame)
      }
 }
 
-static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args)
+static av_cold int rgbtest_init(AVFilterContext *ctx)
 {
     TestSourceContext *test = ctx->priv;
 
-- 
GitLab