diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-03-24 09:09:33 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-03-24 12:26:25 +0100 |
commit | 5dc074d32119bc6068b262bd92214abd66f01de0 (patch) | |
tree | 5221924f4d6612b7a17d86b3c7e786c5f87843ed /libavfilter | |
parent | ab228f91637a8a9018e29b98887b1ad21fb99660 (diff) | |
download | ffmpeg-5dc074d32119bc6068b262bd92214abd66f01de0.tar.gz |
lavfi/kerndeint: use standard options parsing.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_kerndeint.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c index 7e89648a38..2b29bdcef9 100644 --- a/libavfilter/vf_kerndeint.c +++ b/libavfilter/vf_kerndeint.c @@ -59,23 +59,11 @@ static const AVOption kerndeint_options[] = { AVFILTER_DEFINE_CLASS(kerndeint); -static av_cold int init(AVFilterContext *ctx, const char *args) -{ - KerndeintContext *kerndeint = ctx->priv; - const char const * shorthand[] = { "thresh", "map", "order", "sharp", "twoway", NULL }; - - kerndeint->class = &kerndeint_class; - av_opt_set_defaults(kerndeint); - - return av_opt_set_from_string(kerndeint, args, shorthand, "=", ":"); -} - static av_cold void uninit(AVFilterContext *ctx) { KerndeintContext *kerndeint = ctx->priv; av_free(kerndeint->tmp_data[0]); - av_opt_free(kerndeint); } static int query_formats(AVFilterContext *ctx) @@ -317,16 +305,18 @@ static const AVFilterPad kerndeint_outputs[] = { { NULL } }; +static const char *const shorthand[] = { "thresh", "map", "order", "sharp", "twoway", NULL }; + AVFilter avfilter_vf_kerndeint = { .name = "kerndeint", .description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."), .priv_size = sizeof(KerndeintContext), - .init = init, .uninit = uninit, .query_formats = query_formats, .inputs = kerndeint_inputs, .outputs = kerndeint_outputs, - .priv_class = &kerndeint_class, + .priv_class = &kerndeint_class, + .shorthand = shorthand, }; |