From ab228f91637a8a9018e29b98887b1ad21fb99660 Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Sun, 24 Mar 2013 09:08:01 +0100 Subject: lavfi/idet: use standard options parsing. --- libavfilter/vf_idet.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'libavfilter') diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index f61ac5a7d6..275302f16c 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -276,14 +276,6 @@ static int query_formats(AVFilterContext *ctx) static av_cold int init(AVFilterContext *ctx, const char *args) { IDETContext *idet = ctx->priv; - static const char *shorthand[] = { "intl_thres", "prog_thres", NULL }; - int ret; - - idet->class = &idet_class; - av_opt_set_defaults(idet); - - if ((ret = av_opt_set_from_string(idet, args, shorthand, "=", ":")) < 0) - return ret; idet->last_type = UNDETERMINED; memset(idet->history, UNDETERMINED, HIST_SIZE); @@ -312,6 +304,8 @@ static const AVFilterPad idet_outputs[] = { { NULL } }; +static const char *const shorthand[] = { "intl_thres", "prog_thres", NULL }; + AVFilter avfilter_vf_idet = { .name = "idet", .description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."), @@ -323,4 +317,5 @@ AVFilter avfilter_vf_idet = { .inputs = idet_inputs, .outputs = idet_outputs, .priv_class = &idet_class, + .shorthand = shorthand, }; -- cgit v1.2.3