diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-11 03:20:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-11 03:20:43 +0200 |
commit | 670e0f7f66207227d70898b07fe0eace767cd027 (patch) | |
tree | 27079411eb3b76266d52dd126ec1ec3d189b3ff2 | |
parent | 8bafd83aaafad42e64acfe3646e5b4b3597982fd (diff) | |
parent | b7b3302f8f2c7d9f6e08e0a976890eefe3edcc9e (diff) | |
download | ffmpeg-670e0f7f66207227d70898b07fe0eace767cd027.tar.gz |
Merge commit 'b7b3302f8f2c7d9f6e08e0a976890eefe3edcc9e'
* commit 'b7b3302f8f2c7d9f6e08e0a976890eefe3edcc9e':
vsrc_nullsrc: switch to an AVOptions-based system.
Conflicts:
libavfilter/vsrc_nullsrc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/avfilter.c | 1 | ||||
-rw-r--r-- | libavfilter/vsrc_testsrc.c | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 3a2eeae6c3..04ddd76028 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -714,6 +714,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque !strcmp(filter->filter->name, "mptestsrc" ) || !strcmp(filter->filter->name, "negate" ) || !strcmp(filter->filter->name, "noise" ) || + !strcmp(filter->filter->name, "nullsrc" ) || !strcmp(filter->filter->name, "overlay" ) || !strcmp(filter->filter->name, "pad" ) || !strcmp(filter->filter->name, "format") || diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index c5cefbf7d5..6a3a9e98fe 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -95,11 +95,11 @@ static const AVOption color_options[] = { }; static const AVOption options[] = { + COMMON_OPTIONS /* only used by testsrc */ { "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 }, - COMMON_OPTIONS { NULL }, }; @@ -290,10 +290,8 @@ static av_cold int nullsrc_init(AVFilterContext *ctx, const char *args) { TestSourceContext *test = ctx->priv; - test->class = &nullsrc_class; test->fill_picture_fn = nullsrc_fill_picture; - av_opt_set_defaults(test); - return init(ctx, args); + return init(ctx, NULL); } static const AVFilterPad nullsrc_outputs[] = { @@ -312,9 +310,9 @@ AVFilter avfilter_vsrc_nullsrc = { .init = nullsrc_init, .uninit = uninit, .priv_size = sizeof(TestSourceContext), + .priv_class = &nullsrc_class, .inputs = NULL, .outputs = nullsrc_outputs, - .priv_class = &nullsrc_class, }; #endif /* CONFIG_NULLSRC_FILTER */ |