Commit 670e0f7f authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'b7b3302f'

* commit 'b7b3302f':
  vsrc_nullsrc: switch to an AVOptions-based system.

Conflicts:
	libavfilter/vsrc_nullsrc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 8bafd83a b7b3302f
...@@ -714,6 +714,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque ...@@ -714,6 +714,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "mptestsrc" ) || !strcmp(filter->filter->name, "mptestsrc" ) ||
!strcmp(filter->filter->name, "negate" ) || !strcmp(filter->filter->name, "negate" ) ||
!strcmp(filter->filter->name, "noise" ) || !strcmp(filter->filter->name, "noise" ) ||
!strcmp(filter->filter->name, "nullsrc" ) ||
!strcmp(filter->filter->name, "overlay" ) || !strcmp(filter->filter->name, "overlay" ) ||
!strcmp(filter->filter->name, "pad" ) || !strcmp(filter->filter->name, "pad" ) ||
!strcmp(filter->filter->name, "format") || !strcmp(filter->filter->name, "format") ||
......
...@@ -95,11 +95,11 @@ static const AVOption color_options[] = { ...@@ -95,11 +95,11 @@ static const AVOption color_options[] = {
}; };
static const AVOption options[] = { static const AVOption options[] = {
COMMON_OPTIONS
/* only used by testsrc */ /* only used by testsrc */
{ "decimals", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, 0, 17, FLAGS }, { "decimals", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, 0, 17, FLAGS },
{ "n", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, 0, 17, FLAGS }, { "n", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, 0, 17, FLAGS },
COMMON_OPTIONS
{ NULL }, { NULL },
}; };
...@@ -290,10 +290,8 @@ static av_cold int nullsrc_init(AVFilterContext *ctx, const char *args) ...@@ -290,10 +290,8 @@ static av_cold int nullsrc_init(AVFilterContext *ctx, const char *args)
{ {
TestSourceContext *test = ctx->priv; TestSourceContext *test = ctx->priv;
test->class = &nullsrc_class;
test->fill_picture_fn = nullsrc_fill_picture; test->fill_picture_fn = nullsrc_fill_picture;
av_opt_set_defaults(test); return init(ctx, NULL);
return init(ctx, args);
} }
static const AVFilterPad nullsrc_outputs[] = { static const AVFilterPad nullsrc_outputs[] = {
...@@ -312,9 +310,9 @@ AVFilter avfilter_vsrc_nullsrc = { ...@@ -312,9 +310,9 @@ AVFilter avfilter_vsrc_nullsrc = {
.init = nullsrc_init, .init = nullsrc_init,
.uninit = uninit, .uninit = uninit,
.priv_size = sizeof(TestSourceContext), .priv_size = sizeof(TestSourceContext),
.priv_class = &nullsrc_class,
.inputs = NULL, .inputs = NULL,
.outputs = nullsrc_outputs, .outputs = nullsrc_outputs,
.priv_class = &nullsrc_class,
}; };
#endif /* CONFIG_NULLSRC_FILTER */ #endif /* CONFIG_NULLSRC_FILTER */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment