[FFmpeg-cvslog] lavfi: remove now unused args parameter from AVFilter.init

Anton Khirnov git at videolan.org
Thu Apr 11 10:32:35 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Mar 13 08:26:39 2013 +0100| [c43a7ecad997fc527af34b952334f3d030709a1b] | committer: Anton Khirnov

lavfi: remove now unused args parameter from AVFilter.init

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

 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 93760e1..085b4d0 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 9aa917e..f7f003b 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 06f0af8..ad4e3d7 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 d028e28..8ed9676 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 31e3b0e..fcdc34e 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 4b60509..a06812e 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 32e4a2c..c22c283 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 59beb6d..2dbd68f 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 5208c2a..28d3684 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 ea18c12..a927f26 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 b34f33b..ae46403 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 8284fe9..7e8b4cc 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 3fe3714..6fb2aec 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 c69bfe5..75e1c9c 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 1486695..b5f70f0 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 0b928b1..ad83ef4 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 e531124..4673a76 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 770fcc4..90625a3 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 5839c6c..b1ecc64 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 c08a707..2a50143 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 074dd5f..eb201fa 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 e749fe7..452fec0 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 4278a9d..e519a37 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 aed89e3..6f67bb0 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 c5ba634..44f0037 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 597ef40..7da8f3b 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 1e283f6..791a561 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 db2762e..7e83a3a 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 ce56e33..c9b2b92 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 98947a6..5cf9093 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 644a714..0153edc 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 793af81..3834ec4 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 f431cfe..615b20e 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 af79b7a..e958a7b 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;
 



More information about the ffmpeg-cvslog mailing list