diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index 93760e1ec79c57cd2a63104dac91accd55a8fa2f..085b4d05295bb839ed09d2786e5ad2b8860986f7 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 9aa917eb903343992313415a7edd2b1ea1031d09..f7f003b6b1e45766708d0325d038a3e1bcac4684 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 06f0af8660f320f46d3789e944d5ce7a3bf14761..ad4e3d733b826de5476e508f0824fda3cc0bb157 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 d028e28e553eb53d49053c01e80a27df018b7763..8ed96768abf1e5b3feae8854310e75dd7525df4c 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 31e3b0eab79e3749f88dc89ed36d31ef00ce0ea8..fcdc34eca002385c029973722ace1c3c7debb7f6 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 4b60509e583f5ba2b6c1e248edc8da4bb554503a..a06812ed32f464467f5c0e862bcf9a8f49e3d05d 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 32e4a2c520cc7526f0b4883aefc87aa8cb69d8e5..c22c283e02c43c67cbe554991179cd7687fce80d 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 59beb6d2b3a7eb7038cbf1f1dc62de691d1bce4b..2dbd68ffff88bbf9645cda6dc848cd2ee9ab4cdb 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 5208c2a2a3f4dbdf671a79f05eec6b62714d91fd..28d3684b14ffc18473190ce5a2a3f63bbc671148 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 ea18c128a071f507e07a1ccd3f7ea10ebccb090f..a927f26c1974625aee4af81a5e5ddedb2af76627 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 b34f33b27c3f9f3a0b9e099bb1f34dda8c83f340..ae464036c6e0ba5cf62abb0d61a6578659f0fa5c 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 8284fe9a8098f6272e9f35d16e1b3b2d2bae38cf..7e8b4cc24fd189935ca4e2a0f0dc5b02f0732bbb 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 3fe371482f371a38b5441c98b55889d2a1b9b873..6fb2aeccab7b13c367586990ea56f1364deb719a 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 c69bfe5890d65257b8f88dd8b19e5ca93239d35b..75e1c9c6903e7f4ea5bc85fb14e65499cd0a2857 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 1486695a650aede90d25178af6d2fb5c7a9f4953..b5f70f097c034959f57c117ee4df0f31ded3c9a6 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 0b928b13a81ef34867438d7aee827b4e00d8d145..ad83ef4798e47c82757706975d114cfa63c0e2bf 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 e5311246c2dcdcb6a095bd458ed6bcdea9be3f9e..4673a7691d9950106c4bccf4dee79574e93de88f 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 770fcc465f6f32ab990bc697e8741fc7da2cd574..90625a32a2651149154f08d8171f61b6b73b28a4 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 5839c6c9e615f90f6722bddf99195e9373cca17d..b1ecc64da592d5882177d74663a99238df716e47 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 c08a707721e9b9bdcd909cde29d0b6d6dd588026..2a50143b68748e2a351e5f65ea6e7f2ed25c918b 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 074dd5fff52d6871e32cd859a823951b70271763..eb201fa898d06382260028de0c4355df8445dc39 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 e749fe76683caa1c94d70207d14eb60847a96011..452fec0d845b3dada11dc63b5d54641d16f32cc1 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 4278a9d10e4ed5a4229e29daf13ffe6dd04f3449..e519a374ae8eed568e8abe6933d60f5ff111dc76 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 aed89e3714189f18a80e87fb63e0b018db4623ba..6f67bb0c6fe78cb99bfb78b230c6b2fd1c59f244 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 c5ba634cf35796f9aaf76b92ddd39fb1c2047f8f..44f0037764cc8cb2e03725c3960b3d3bb4a7d40d 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 597ef40175a1ea70444e30a6cf0d7802a2f945a5..7da8f3b8535059578a0b2dd5413e5e2097b6f09d 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 1e283f6850d052e0160a684e96d7054cca523618..791a561cf7e2f48d62746a365ddd5bd697b960f6 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 db2762e086f4dd7ff30d6d091b512a22a851ef4c..7e83a3a3ac8a7c846b8ed56e9c2005dd705c9633 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 ce56e33757ca15bcc6ec9db738dfb2ad724919da..c9b2b92df665f1da27f0390da9546d503713c9b3 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 98947a6816ecda9cd42d829aaa542f002f1861dc..5cf909370954d858b026e4cc7b4083461cec14b1 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 644a714ea6593371dd2e598363e49fcb66e7918f..0153edc563cce5b82a6f9fb99100de11b3a53543 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 793af811a7caef99b2d9a3719265c8287963ba3f..3834ec406486abf72568624650cc8a029e992771 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 f431cfe7f280aec906ef49ceaf65639ccdc321a1..615b20ec611aed7bcc40c07a1c3522839a0103cd 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 af79b7a43bb0e484b2f8607502c61778588c0d39..e958a7b0dce66bdcb4874bfe5f3880b06fa36ff9 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;