Browse code

lavfi/idet: use standard options parsing.

Clément Bœsch authored on 2013/03/24 17:08:01
Showing 1 changed files
... ...
@@ -276,14 +276,6 @@ static int query_formats(AVFilterContext *ctx)
276 276
 static av_cold int init(AVFilterContext *ctx, const char *args)
277 277
 {
278 278
     IDETContext *idet = ctx->priv;
279
-    static const char *shorthand[] = { "intl_thres", "prog_thres", NULL };
280
-    int ret;
281
-
282
-    idet->class = &idet_class;
283
-    av_opt_set_defaults(idet);
284
-
285
-    if ((ret = av_opt_set_from_string(idet, args, shorthand, "=", ":")) < 0)
286
-        return ret;
287 279
 
288 280
     idet->last_type = UNDETERMINED;
289 281
     memset(idet->history, UNDETERMINED, HIST_SIZE);
... ...
@@ -312,6 +304,8 @@ static const AVFilterPad idet_outputs[] = {
312 312
     { NULL }
313 313
 };
314 314
 
315
+static const char *const shorthand[] = { "intl_thres", "prog_thres", NULL };
316
+
315 317
 AVFilter avfilter_vf_idet = {
316 318
     .name          = "idet",
317 319
     .description   = NULL_IF_CONFIG_SMALL("Interlace detect Filter."),
... ...
@@ -323,4 +317,5 @@ AVFilter avfilter_vf_idet = {
323 323
     .inputs        = idet_inputs,
324 324
     .outputs       = idet_outputs,
325 325
     .priv_class    = &idet_class,
326
+    .shorthand     = shorthand,
326 327
 };