aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vsrc_testsrc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-11 10:02:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-11 10:02:07 +0200
commitef29a95a4d60febcc7f01fbebd9969d1c8793588 (patch)
tree1069259a524aff4e11246a9965135a4a6ee340e4 /libavfilter/vsrc_testsrc.c
parentdb2de94e95c2095a781892ad7a3d472d952652a8 (diff)
parent7b3eb745b98b04dd8a4970b9fd6c98998e858fc1 (diff)
downloadffmpeg-ef29a95a4d60febcc7f01fbebd9969d1c8793588.tar.gz
Merge commit '7b3eb745b98b04dd8a4970b9fd6c98998e858fc1'
* commit '7b3eb745b98b04dd8a4970b9fd6c98998e858fc1': vsrc_testsrc: switch to an AVOptions-based system. Conflicts: doc/filters.texi libavfilter/vsrc_testsrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vsrc_testsrc.c')
-rw-r--r--libavfilter/vsrc_testsrc.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 6a3a9e98fe..16455003d7 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -508,10 +508,8 @@ static av_cold int test_init(AVFilterContext *ctx, const char *args)
{
TestSourceContext *test = ctx->priv;
- test->class = &testsrc_class;
test->fill_picture_fn = test_fill_picture;
- av_opt_set_defaults(test);
- return init(ctx, args);
+ return init(ctx, NULL);
}
static int test_query_formats(AVFilterContext *ctx)
@@ -534,17 +532,17 @@ static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = {
};
AVFilter avfilter_vsrc_testsrc = {
- .name = "testsrc",
- .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
- .priv_size = sizeof(TestSourceContext),
- .init = test_init,
- .uninit = uninit,
+ .name = "testsrc",
+ .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
+ .priv_size = sizeof(TestSourceContext),
+ .priv_class = &testsrc_class,
+ .init = test_init,
+ .uninit = uninit,
- .query_formats = test_query_formats,
+ .query_formats = test_query_formats,
.inputs = NULL,
.outputs = avfilter_vsrc_testsrc_outputs,
- .priv_class = &testsrc_class,
};
#endif /* CONFIG_TESTSRC_FILTER */
@@ -615,10 +613,8 @@ static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args)
TestSourceContext *test = ctx->priv;
test->draw_once = 1;
- test->class = &rgbtestsrc_class;
test->fill_picture_fn = rgbtest_fill_picture;
- av_opt_set_defaults(test);
- return init(ctx, args);
+ return init(ctx, NULL);
}
static int rgbtest_query_formats(AVFilterContext *ctx)
@@ -654,18 +650,18 @@ static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = {
};
AVFilter avfilter_vsrc_rgbtestsrc = {
- .name = "rgbtestsrc",
- .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
- .priv_size = sizeof(TestSourceContext),
- .init = rgbtest_init,
- .uninit = uninit,
+ .name = "rgbtestsrc",
+ .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
+ .priv_size = sizeof(TestSourceContext),
+ .priv_class = &rgbtestsrc_class,
+ .init = rgbtest_init,
+ .uninit = uninit,
- .query_formats = rgbtest_query_formats,
+ .query_formats = rgbtest_query_formats,
.inputs = NULL,
.outputs = avfilter_vsrc_rgbtestsrc_outputs,
- .priv_class = &rgbtestsrc_class,
};
#endif /* CONFIG_RGBTESTSRC_FILTER */