summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-24 09:08:01 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-24 12:26:25 +0100
commitab228f91637a8a9018e29b98887b1ad21fb99660 (patch)
tree601725d18b7fd76b82ce0126e3303dd51330749d
parent552c02f20f5ba1665279e6e631c6517b72c01891 (diff)
lavfi/idet: use standard options parsing.
-rw-r--r--libavfilter/vf_idet.c11
1 files changed, 3 insertions, 8 deletions
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,
};