This is mostly automated global search and replace The deprecated aconvert filter is disabled, if it still has users it should be updated Signed-off-by: Michael Niedermayer <michaelni@gmx.at>tags/n2.0
@@ -38,12 +38,12 @@ typedef struct { | |||||
struct SwrContext *swr; | struct SwrContext *swr; | ||||
} AConvertContext; | } AConvertContext; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args0) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
AConvertContext *aconvert = ctx->priv; | AConvertContext *aconvert = ctx->priv; | ||||
char *arg, *ptr = NULL; | char *arg, *ptr = NULL; | ||||
int ret = 0; | int ret = 0; | ||||
char *args = av_strdup(args0); | |||||
char *args = av_strdup(NULL); | |||||
av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat instead\n"); | av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat instead\n"); | ||||
@@ -77,7 +77,7 @@ static const AVOption afade_options[] = { | |||||
AVFILTER_DEFINE_CLASS(afade); | AVFILTER_DEFINE_CLASS(afade); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
AudioFadeContext *afade = ctx->priv; | AudioFadeContext *afade = ctx->priv; | ||||
@@ -303,7 +303,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) | |||||
return ff_filter_frame(ctx->outputs[0], outbuf); | return ff_filter_frame(ctx->outputs[0], outbuf); | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
AMergeContext *am = ctx->priv; | AMergeContext *am = ctx->priv; | ||||
int i; | int i; | ||||
@@ -56,7 +56,7 @@ static const AVOption apad_options[] = { | |||||
AVFILTER_DEFINE_CLASS(apad); | AVFILTER_DEFINE_CLASS(apad); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
APadContext *apad = ctx->priv; | APadContext *apad = ctx->priv; | ||||
@@ -76,7 +76,7 @@ static const AVOption aphaser_options[] = { | |||||
AVFILTER_DEFINE_CLASS(aphaser); | AVFILTER_DEFINE_CLASS(aphaser); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
AudioPhaserContext *p = ctx->priv; | AudioPhaserContext *p = ctx->priv; | ||||
@@ -54,7 +54,7 @@ static const AVOption asetnsamples_options[] = { | |||||
AVFILTER_DEFINE_CLASS(asetnsamples); | AVFILTER_DEFINE_CLASS(asetnsamples); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
ASNSContext *asns = ctx->priv; | ASNSContext *asns = ctx->priv; | ||||
@@ -71,7 +71,7 @@ static const AVOption astreamsync_options[] = { | |||||
AVFILTER_DEFINE_CLASS(astreamsync); | AVFILTER_DEFINE_CLASS(astreamsync); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args0) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
AStreamSyncContext *as = ctx->priv; | AStreamSyncContext *as = ctx->priv; | ||||
int r, i; | int r, i; | ||||
@@ -960,7 +960,7 @@ static int yae_flush(ATempoContext *atempo, | |||||
return atempo->position[1] == stop_here ? 0 : AVERROR(EAGAIN); | return atempo->position[1] == stop_here ? 0 : AVERROR(EAGAIN); | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
ATempoContext *atempo = ctx->priv; | ATempoContext *atempo = ctx->priv; | ||||
atempo->format = AV_SAMPLE_FMT_NONE; | atempo->format = AV_SAMPLE_FMT_NONE; | ||||
@@ -116,7 +116,7 @@ typedef struct { | |||||
double b0, double b1, double b2, double a1, double a2); | double b0, double b1, double b2, double a1, double a2); | ||||
} BiquadsContext; | } BiquadsContext; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
BiquadsContext *p = ctx->priv; | BiquadsContext *p = ctx->priv; | ||||
@@ -446,12 +446,12 @@ static const AVFilterPad outputs[] = { | |||||
#define DEFINE_BIQUAD_FILTER(name_, description_) \ | #define DEFINE_BIQUAD_FILTER(name_, description_) \ | ||||
AVFILTER_DEFINE_CLASS(name_); \ | AVFILTER_DEFINE_CLASS(name_); \ | ||||
static av_cold int name_##_init(AVFilterContext *ctx, const char *args) \ | |||||
static av_cold int name_##_init(AVFilterContext *ctx) \ | |||||
{ \ | { \ | ||||
BiquadsContext *p = ctx->priv; \ | BiquadsContext *p = ctx->priv; \ | ||||
p->class = &name_##_class; \ | p->class = &name_##_class; \ | ||||
p->filter_type = name_; \ | p->filter_type = name_; \ | ||||
return init(ctx, args); \ | |||||
return init(ctx); \ | |||||
} \ | } \ | ||||
\ | \ | ||||
AVFilter avfilter_af_##name_ = { \ | AVFilter avfilter_af_##name_ = { \ | ||||
@@ -99,7 +99,7 @@ static int parse_channel_name(char **arg, int *rchannel, int *rnamed) | |||||
return AVERROR(EINVAL); | return AVERROR(EINVAL); | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args0) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
PanContext *const pan = ctx->priv; | PanContext *const pan = ctx->priv; | ||||
char *arg, *arg0, *tokenizer, *args = av_strdup(pan->args); | char *arg, *arg0, *tokenizer, *args = av_strdup(pan->args); | ||||
@@ -82,7 +82,7 @@ static const AVOption aevalsrc_options[]= { | |||||
AVFILTER_DEFINE_CLASS(aevalsrc); | AVFILTER_DEFINE_CLASS(aevalsrc); | ||||
static int init(AVFilterContext *ctx, const char *args) | |||||
static int init(AVFilterContext *ctx) | |||||
{ | { | ||||
EvalContext *eval = ctx->priv; | EvalContext *eval = ctx->priv; | ||||
char *args1 = av_strdup(eval->exprs); | char *args1 = av_strdup(eval->exprs); | ||||
@@ -59,7 +59,7 @@ static const AVOption anullsrc_options[]= { | |||||
AVFILTER_DEFINE_CLASS(anullsrc); | AVFILTER_DEFINE_CLASS(anullsrc); | ||||
static int init(AVFilterContext *ctx, const char *args) | |||||
static int init(AVFilterContext *ctx) | |||||
{ | { | ||||
ANullContext *null = ctx->priv; | ANullContext *null = ctx->priv; | ||||
int ret; | int ret; | ||||
@@ -131,7 +131,7 @@ static int select_voice(struct voice_entry **entry_ret, const char *voice_name, | |||||
return AVERROR(EINVAL); | return AVERROR(EINVAL); | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
FliteContext *flite = ctx->priv; | FliteContext *flite = ctx->priv; | ||||
int ret = 0; | int ret = 0; | ||||
@@ -120,7 +120,7 @@ static void make_sin_table(int16_t *sin) | |||||
sin[i + 2 * half_pi] = -sin[i]; | sin[i + 2 * half_pi] = -sin[i]; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
SineContext *sine = ctx->priv; | SineContext *sine = ctx->priv; | ||||
@@ -355,7 +355,7 @@ static int request_frame(AVFilterLink *outlink) | |||||
} | } | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
ConcatContext *cat = ctx->priv; | ConcatContext *cat = ctx->priv; | ||||
unsigned seg, type, str; | unsigned seg, type, str; | ||||
@@ -491,7 +491,7 @@ typedef struct AVFilter { | |||||
* callback. Args contains the user-supplied parameters, opaque is | * callback. Args contains the user-supplied parameters, opaque is | ||||
* used for providing binary data. | * used for providing binary data. | ||||
*/ | */ | ||||
int (*init_opaque)(AVFilterContext *ctx, const char *args, void *opaque); | |||||
int (*init_opaque)(AVFilterContext *ctx, void *opaque); | |||||
/** | /** | ||||
* Shorthand syntax for init arguments. | * Shorthand syntax for init arguments. | ||||
@@ -362,7 +362,7 @@ int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx) | |||||
return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + ff_poll_frame(inlink); | return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + ff_poll_frame(inlink); | ||||
} | } | ||||
static av_cold int vsink_init(AVFilterContext *ctx, const char *args, void *opaque) | |||||
static av_cold int vsink_init(AVFilterContext *ctx, void *opaque) | |||||
{ | { | ||||
BufferSinkContext *buf = ctx->priv; | BufferSinkContext *buf = ctx->priv; | ||||
AVBufferSinkParams *params = opaque; | AVBufferSinkParams *params = opaque; | ||||
@@ -411,7 +411,7 @@ static int64_t *concat_channels_lists(const int64_t *layouts, const int *counts) | |||||
return list; | return list; | ||||
} | } | ||||
static av_cold int asink_init(AVFilterContext *ctx, const char *args, void *opaque) | |||||
static av_cold int asink_init(AVFilterContext *ctx, void *opaque) | |||||
{ | { | ||||
BufferSinkContext *buf = ctx->priv; | BufferSinkContext *buf = ctx->priv; | ||||
AVABufferSinkParams *params = opaque; | AVABufferSinkParams *params = opaque; | ||||
@@ -403,7 +403,7 @@ static struct hist_entry *get_histogram(void) | |||||
return h; | return h; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
EBUR128Context *ebur128 = ctx->priv; | EBUR128Context *ebur128 = ctx->priv; | ||||
AVFilterPad pad; | AVFilterPad pad; | ||||
@@ -54,7 +54,7 @@ static const AVOption options[] = { | |||||
{ NULL } | { NULL } | ||||
}; | }; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
PermsContext *perms = ctx->priv; | PermsContext *perms = ctx->priv; | ||||
@@ -139,7 +139,7 @@ typedef struct { | |||||
} SelectContext; | } SelectContext; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args, const AVClass *class) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
SelectContext *select = ctx->priv; | SelectContext *select = ctx->priv; | ||||
int ret; | int ret; | ||||
@@ -399,12 +399,12 @@ static const AVOption aselect_options[] = { | |||||
}; | }; | ||||
AVFILTER_DEFINE_CLASS(aselect); | AVFILTER_DEFINE_CLASS(aselect); | ||||
static av_cold int aselect_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int aselect_init(AVFilterContext *ctx) | |||||
{ | { | ||||
SelectContext *select = ctx->priv; | SelectContext *select = ctx->priv; | ||||
int ret; | int ret; | ||||
if ((ret = init(ctx, args, &aselect_class)) < 0) | |||||
if ((ret = init(ctx)) < 0) | |||||
return ret; | return ret; | ||||
if (select->do_scene_detect) { | if (select->do_scene_detect) { | ||||
@@ -458,12 +458,12 @@ static const AVOption select_options[] = { | |||||
AVFILTER_DEFINE_CLASS(select); | AVFILTER_DEFINE_CLASS(select); | ||||
static av_cold int select_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int select_init(AVFilterContext *ctx) | |||||
{ | { | ||||
SelectContext *select = ctx->priv; | SelectContext *select = ctx->priv; | ||||
int ret; | int ret; | ||||
if ((ret = init(ctx, args, &select_class)) < 0) | |||||
if ((ret = init(ctx)) < 0) | |||||
return ret; | return ret; | ||||
if (select->do_scene_detect && !CONFIG_AVCODEC) { | if (select->do_scene_detect && !CONFIG_AVCODEC) { | ||||
@@ -510,7 +510,7 @@ end: | |||||
#define sendcmd_options options | #define sendcmd_options options | ||||
AVFILTER_DEFINE_CLASS(sendcmd); | AVFILTER_DEFINE_CLASS(sendcmd); | ||||
static av_cold int sendcmd_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int sendcmd_init(AVFilterContext *ctx) | |||||
{ | { | ||||
return init(ctx); | return init(ctx); | ||||
} | } | ||||
@@ -552,7 +552,7 @@ AVFilter avfilter_vf_sendcmd = { | |||||
#define asendcmd_options options | #define asendcmd_options options | ||||
AVFILTER_DEFINE_CLASS(asendcmd); | AVFILTER_DEFINE_CLASS(asendcmd); | ||||
static av_cold int asendcmd_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int asendcmd_init(AVFilterContext *ctx) | |||||
{ | { | ||||
return init(ctx); | return init(ctx); | ||||
} | } | ||||
@@ -86,7 +86,7 @@ typedef struct { | |||||
enum AVMediaType type; | enum AVMediaType type; | ||||
} SetPTSContext; | } SetPTSContext; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
SetPTSContext *setpts = ctx->priv; | SetPTSContext *setpts = ctx->priv; | ||||
int ret; | int ret; | ||||
@@ -563,7 +563,7 @@ static int movie_request_frame(AVFilterLink *outlink) | |||||
AVFILTER_DEFINE_CLASS(movie); | AVFILTER_DEFINE_CLASS(movie); | ||||
static av_cold int movie_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int movie_init(AVFilterContext *ctx) | |||||
{ | { | ||||
return movie_common_init(ctx); | return movie_common_init(ctx); | ||||
} | } | ||||
@@ -588,7 +588,7 @@ AVFilter avfilter_avsrc_movie = { | |||||
#define amovie_options movie_options | #define amovie_options movie_options | ||||
AVFILTER_DEFINE_CLASS(amovie); | AVFILTER_DEFINE_CLASS(amovie); | ||||
static av_cold int amovie_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int amovie_init(AVFilterContext *ctx) | |||||
{ | { | ||||
return movie_common_init(ctx); | return movie_common_init(ctx); | ||||
} | } | ||||
@@ -220,7 +220,7 @@ static void blend_expr(const uint8_t *top, int top_linesize, | |||||
} | } | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
BlendContext *b = ctx->priv; | BlendContext *b = ctx->priv; | ||||
int ret, plane; | int ret, plane; | ||||
@@ -160,7 +160,7 @@ static void calc_coefficients(AVFilterContext *ctx) | |||||
static const char *color_modes[] = {"bt709", "fcc", "bt601", "smpte240m"}; | static const char *color_modes[] = {"bt709", "fcc", "bt601", "smpte240m"}; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
ColorMatrixContext *color = ctx->priv; | ColorMatrixContext *color = ctx->priv; | ||||
@@ -295,7 +295,7 @@ end: | |||||
return ret; | return ret; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
int i, j, ret; | int i, j, ret; | ||||
CurvesContext *curves = ctx->priv; | CurvesContext *curves = ctx->priv; | ||||
@@ -129,7 +129,7 @@ static int decimate_frame(AVFilterContext *ctx, | |||||
return 1; | return 1; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
DecimateContext *decimate = ctx->priv; | DecimateContext *decimate = ctx->priv; | ||||
@@ -344,7 +344,7 @@ static int deshake_transform_c(AVFilterContext *ctx, | |||||
return ret; | return ret; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
int ret; | int ret; | ||||
DeshakeContext *deshake = ctx->priv; | DeshakeContext *deshake = ctx->priv; | ||||
@@ -601,7 +601,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char | |||||
int ret; | int ret; | ||||
uninit(ctx); | uninit(ctx); | ||||
dtext->reinit = 1; | dtext->reinit = 1; | ||||
if ((ret = init(ctx, arg)) < 0) | |||||
if ((ret = init(ctx)) < 0) | |||||
return ret; | return ret; | ||||
return config_input(ctx->inputs[0]); | return config_input(ctx->inputs[0]); | ||||
} | } | ||||
@@ -50,7 +50,7 @@ static const AVOption edgedetect_options[] = { | |||||
AVFILTER_DEFINE_CLASS(edgedetect); | AVFILTER_DEFINE_CLASS(edgedetect); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
EdgeDetectContext *edgedetect = ctx->priv; | EdgeDetectContext *edgedetect = ctx->priv; | ||||
@@ -88,7 +88,7 @@ static double alpha(void *priv, double x, double y) { return getpix(priv, x, y, | |||||
static const char *const var_names[] = { "X", "Y", "W", "H", "N", "SW", "SH", "T", NULL }; | static const char *const var_names[] = { "X", "Y", "W", "H", "N", "SW", "SH", "T", NULL }; | ||||
enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_SW, VAR_SH, VAR_T, VAR_VARS_NB }; | enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_SW, VAR_SH, VAR_T, VAR_VARS_NB }; | ||||
static av_cold int geq_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int geq_init(AVFilterContext *ctx) | |||||
{ | { | ||||
GEQContext *geq = ctx->priv; | GEQContext *geq = ctx->priv; | ||||
int plane, ret = 0; | int plane, ret = 0; | ||||
@@ -82,7 +82,7 @@ static const AVOption histeq_options[] = { | |||||
AVFILTER_DEFINE_CLASS(histeq); | AVFILTER_DEFINE_CLASS(histeq); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
HisteqContext *histeq = ctx->priv; | HisteqContext *histeq = ctx->priv; | ||||
@@ -120,7 +120,7 @@ static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void * | |||||
return 0; | return 0; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
HueContext *hue = ctx->priv; | HueContext *hue = ctx->priv; | ||||
int ret; | int ret; | ||||
@@ -273,7 +273,7 @@ static int query_formats(AVFilterContext *ctx) | |||||
return 0; | return 0; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
IDETContext *idet = ctx->priv; | IDETContext *idet = ctx->priv; | ||||
@@ -74,7 +74,7 @@ typedef struct { | |||||
const AVClass *class; | const AVClass *class; | ||||
char *name; | char *name; | ||||
char *params; | char *params; | ||||
int (*init)(AVFilterContext *ctx, const char *args); | |||||
int (*init)(AVFilterContext *ctx); | |||||
void (*uninit)(AVFilterContext *ctx); | void (*uninit)(AVFilterContext *ctx); | ||||
void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg); | void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg); | ||||
void *priv; | void *priv; | ||||
@@ -86,7 +86,7 @@ typedef struct { | |||||
double param3, param4; | double param3, param4; | ||||
} SmoothContext; | } SmoothContext; | ||||
static av_cold int smooth_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int smooth_init(AVFilterContext *ctx) | |||||
{ | { | ||||
OCVContext *ocv = ctx->priv; | OCVContext *ocv = ctx->priv; | ||||
SmoothContext *smooth = ocv->priv; | SmoothContext *smooth = ocv->priv; | ||||
@@ -252,7 +252,7 @@ typedef struct { | |||||
IplConvKernel *kernel; | IplConvKernel *kernel; | ||||
} DilateContext; | } DilateContext; | ||||
static av_cold int dilate_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int dilate_init(AVFilterContext *ctx) | |||||
{ | { | ||||
OCVContext *ocv = ctx->priv; | OCVContext *ocv = ctx->priv; | ||||
DilateContext *dilate = ocv->priv; | DilateContext *dilate = ocv->priv; | ||||
@@ -306,7 +306,7 @@ static void erode_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIma | |||||
typedef struct { | typedef struct { | ||||
const char *name; | const char *name; | ||||
size_t priv_size; | size_t priv_size; | ||||
int (*init)(AVFilterContext *ctx, const char *args); | |||||
int (*init)(AVFilterContext *ctx); | |||||
void (*uninit)(AVFilterContext *ctx); | void (*uninit)(AVFilterContext *ctx); | ||||
void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg); | void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg); | ||||
} OCVFilterEntry; | } OCVFilterEntry; | ||||
@@ -331,7 +331,7 @@ static av_cold int init(AVFilterContext *ctx) | |||||
if (!(ocv->priv = av_mallocz(entry->priv_size))) | if (!(ocv->priv = av_mallocz(entry->priv_size))) | ||||
return AVERROR(ENOMEM); | return AVERROR(ENOMEM); | ||||
return ocv->init(ctx, ocv->params); | |||||
return ocv->init(ctx); | |||||
} | } | ||||
} | } | ||||
@@ -635,11 +635,12 @@ static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt){ | |||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
MPContext *m = ctx->priv; | MPContext *m = ctx->priv; | ||||
int cpu_flags = av_get_cpu_flags(); | int cpu_flags = av_get_cpu_flags(); | ||||
char name[256]; | char name[256]; | ||||
const char *args; | |||||
int i; | int i; | ||||
ff_gCpuCaps.hasMMX = cpu_flags & AV_CPU_FLAG_MMX; | ff_gCpuCaps.hasMMX = cpu_flags & AV_CPU_FLAG_MMX; | ||||
@@ -400,7 +400,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) | |||||
return ret; | return ret; | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
NoiseContext *n = ctx->priv; | NoiseContext *n = ctx->priv; | ||||
int ret, i; | int ret, i; | ||||
@@ -118,7 +118,7 @@ typedef struct { | |||||
AVExpr *x_pexpr, *y_pexpr, *enable_pexpr; | AVExpr *x_pexpr, *y_pexpr, *enable_pexpr; | ||||
} OverlayContext; | } OverlayContext; | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
OverlayContext *over = ctx->priv; | OverlayContext *over = ctx->priv; | ||||
@@ -47,7 +47,7 @@ static const AVOption pp_options[] = { | |||||
AVFILTER_DEFINE_CLASS(pp); | AVFILTER_DEFINE_CLASS(pp); | ||||
static av_cold int pp_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int pp_init(AVFilterContext *ctx) | |||||
{ | { | ||||
int i; | int i; | ||||
PPFilterContext *pp = ctx->priv; | PPFilterContext *pp = ctx->priv; | ||||
@@ -277,7 +277,7 @@ static void generate_half_size_image(const uint8_t *src_data, int src_linesize, | |||||
src_w/2, src_h/2, 0, max_mask_size); | src_w/2, src_h/2, 0, max_mask_size); | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
RemovelogoContext *removelogo = ctx->priv; | RemovelogoContext *removelogo = ctx->priv; | ||||
int ***mask; | int ***mask; | ||||
@@ -82,7 +82,7 @@ static const AVOption smartblur_options[] = { | |||||
AVFILTER_DEFINE_CLASS(smartblur); | AVFILTER_DEFINE_CLASS(smartblur); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
SmartblurContext *sblur = ctx->priv; | SmartblurContext *sblur = ctx->priv; | ||||
@@ -85,7 +85,7 @@ static void ass_log(int ass_level, const char *fmt, va_list args, void *ctx) | |||||
av_log(ctx, level, "\n"); | av_log(ctx, level, "\n"); | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
AssContext *ass = ctx->priv; | AssContext *ass = ctx->priv; | ||||
@@ -210,10 +210,10 @@ static const AVOption ass_options[] = { | |||||
AVFILTER_DEFINE_CLASS(ass); | AVFILTER_DEFINE_CLASS(ass); | ||||
static av_cold int init_ass(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init_ass(AVFilterContext *ctx) | |||||
{ | { | ||||
AssContext *ass = ctx->priv; | AssContext *ass = ctx->priv; | ||||
int ret = init(ctx, args); | |||||
int ret = init(ctx); | |||||
if (ret < 0) | if (ret < 0) | ||||
return ret; | return ret; | ||||
@@ -251,7 +251,7 @@ static const AVOption subtitles_options[] = { | |||||
AVFILTER_DEFINE_CLASS(subtitles); | AVFILTER_DEFINE_CLASS(subtitles); | ||||
static av_cold int init_subtitles(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init_subtitles(AVFilterContext *ctx) | |||||
{ | { | ||||
int ret, sid; | int ret, sid; | ||||
AVDictionary *codec_opts = NULL; | AVDictionary *codec_opts = NULL; | ||||
@@ -264,7 +264,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx, const char *args) | |||||
AssContext *ass = ctx->priv; | AssContext *ass = ctx->priv; | ||||
/* Init libass */ | /* Init libass */ | ||||
ret = init(ctx, args); | |||||
ret = init(ctx); | |||||
if (ret < 0) | if (ret < 0) | ||||
return ret; | return ret; | ||||
ass->track = ass_new_track(ass->library); | ass->track = ass_new_track(ass->library); | ||||
@@ -68,7 +68,7 @@ static const AVOption telecine_options[] = { | |||||
AVFILTER_DEFINE_CLASS(telecine); | AVFILTER_DEFINE_CLASS(telecine); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
TelecineContext *tc = ctx->priv; | TelecineContext *tc = ctx->priv; | ||||
const char *p; | const char *p; | ||||
@@ -56,7 +56,7 @@ static const AVOption thumbnail_options[] = { | |||||
AVFILTER_DEFINE_CLASS(thumbnail); | AVFILTER_DEFINE_CLASS(thumbnail); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
ThumbContext *thumb = ctx->priv; | ThumbContext *thumb = ctx->priv; | ||||
@@ -62,7 +62,7 @@ static const AVOption tile_options[] = { | |||||
AVFILTER_DEFINE_CLASS(tile); | AVFILTER_DEFINE_CLASS(tile); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
TileContext *tile = ctx->priv; | TileContext *tile = ctx->priv; | ||||
@@ -159,7 +159,7 @@ static int init_pattern_from_file(AVFilterContext *ctx) | |||||
return init_pattern_from_string(ctx); | return init_pattern_from_string(ctx); | ||||
} | } | ||||
static int init(AVFilterContext *ctx, const char *args) | |||||
static int init(AVFilterContext *ctx) | |||||
{ | { | ||||
CellAutoContext *cellauto = ctx->priv; | CellAutoContext *cellauto = ctx->priv; | ||||
int ret; | int ret; | ||||
@@ -220,7 +220,7 @@ static int init_pattern_from_file(AVFilterContext *ctx) | |||||
return 0; | return 0; | ||||
} | } | ||||
static int init(AVFilterContext *ctx, const char *args) | |||||
static int init(AVFilterContext *ctx) | |||||
{ | { | ||||
LifeContext *life = ctx->priv; | LifeContext *life = ctx->priv; | ||||
int ret; | int ret; | ||||
@@ -119,7 +119,7 @@ static const AVOption mandelbrot_options[] = { | |||||
AVFILTER_DEFINE_CLASS(mandelbrot); | AVFILTER_DEFINE_CLASS(mandelbrot); | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
MBContext *mb = ctx->priv; | MBContext *mb = ctx->priv; | ||||
@@ -256,7 +256,7 @@ static void ring2_test(uint8_t *dst, int dst_linesize, int off) | |||||
} | } | ||||
} | } | ||||
static av_cold int init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int init(AVFilterContext *ctx) | |||||
{ | { | ||||
MPTestContext *test = ctx->priv; | MPTestContext *test = ctx->priv; | ||||
int64_t duration = -1; | int64_t duration = -1; | ||||
@@ -213,7 +213,7 @@ static void color_fill_picture(AVFilterContext *ctx, AVFrame *picref) | |||||
0, 0, test->w, test->h); | 0, 0, test->w, test->h); | ||||
} | } | ||||
static av_cold int color_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int color_init(AVFilterContext *ctx) | |||||
{ | { | ||||
TestSourceContext *test = ctx->priv; | TestSourceContext *test = ctx->priv; | ||||
test->fill_picture_fn = color_fill_picture; | test->fill_picture_fn = color_fill_picture; | ||||
@@ -282,7 +282,7 @@ AVFILTER_DEFINE_CLASS(nullsrc); | |||||
static void nullsrc_fill_picture(AVFilterContext *ctx, AVFrame *picref) { } | static void nullsrc_fill_picture(AVFilterContext *ctx, AVFrame *picref) { } | ||||
static av_cold int nullsrc_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int nullsrc_init(AVFilterContext *ctx) | |||||
{ | { | ||||
TestSourceContext *test = ctx->priv; | TestSourceContext *test = ctx->priv; | ||||
@@ -754,7 +754,7 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref) | |||||
draw_bar(test, black, x, r_h + w_h, test->w - x, p_h, picref); | draw_bar(test, black, x, r_h + w_h, test->w - x, p_h, picref); | ||||
} | } | ||||
static av_cold int smptebars_init(AVFilterContext *ctx, const char *args) | |||||
static av_cold int smptebars_init(AVFilterContext *ctx) | |||||
{ | { | ||||
TestSourceContext *test = ctx->priv; | TestSourceContext *test = ctx->priv; | ||||