Commit ab228f91 authored by Clément Bœsch's avatar Clément Bœsch

lavfi/idet: use standard options parsing.

parent 552c02f2
...@@ -276,14 +276,6 @@ static int query_formats(AVFilterContext *ctx) ...@@ -276,14 +276,6 @@ static int query_formats(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx, const char *args) static av_cold int init(AVFilterContext *ctx, const char *args)
{ {
IDETContext *idet = ctx->priv; 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; idet->last_type = UNDETERMINED;
memset(idet->history, UNDETERMINED, HIST_SIZE); memset(idet->history, UNDETERMINED, HIST_SIZE);
...@@ -312,6 +304,8 @@ static const AVFilterPad idet_outputs[] = { ...@@ -312,6 +304,8 @@ static const AVFilterPad idet_outputs[] = {
{ NULL } { NULL }
}; };
static const char *const shorthand[] = { "intl_thres", "prog_thres", NULL };
AVFilter avfilter_vf_idet = { AVFilter avfilter_vf_idet = {
.name = "idet", .name = "idet",
.description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."), .description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."),
...@@ -323,4 +317,5 @@ AVFilter avfilter_vf_idet = { ...@@ -323,4 +317,5 @@ AVFilter avfilter_vf_idet = {
.inputs = idet_inputs, .inputs = idet_inputs,
.outputs = idet_outputs, .outputs = idet_outputs,
.priv_class = &idet_class, .priv_class = &idet_class,
.shorthand = shorthand,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment