diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-03-16 21:28:02 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-03-20 21:13:56 +0100 |
commit | 2753d4ebf067593070ca4e9b3ea1dbe6ace23ba3 (patch) | |
tree | 402b4ee85883e1f709be937b2b94c65063ff5f8f /libavfilter | |
parent | 8d4d11cd89ec7ddd469a3a588debee3dd6473301 (diff) | |
download | ffmpeg-2753d4ebf067593070ca4e9b3ea1dbe6ace23ba3.tar.gz |
lavfi/vf_yadif: use standard options parsing.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_yadif.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 1ec51dfdc0..80076f7517 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -377,7 +377,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_frame_free(&yadif->prev); av_frame_free(&yadif->cur ); av_frame_free(&yadif->next); - av_opt_free(yadif); } static int query_formats(AVFilterContext *ctx) @@ -424,14 +423,6 @@ static int query_formats(AVFilterContext *ctx) static av_cold int init(AVFilterContext *ctx, const char *args) { YADIFContext *yadif = ctx->priv; - static const char *shorthand[] = { "mode", "parity", "deint", NULL }; - int ret; - - yadif->class = &yadif_class; - av_opt_set_defaults(yadif); - - if ((ret = av_opt_set_from_string(yadif, args, shorthand, "=", ":")) < 0) - return ret; av_log(ctx, AV_LOG_VERBOSE, "mode:%d parity:%d deint:%d\n", yadif->mode, yadif->parity, yadif->deint); @@ -491,6 +482,8 @@ static const AVFilterPad avfilter_vf_yadif_outputs[] = { { NULL } }; +static const char *const shorthand[] = { "mode", "parity", "deint", NULL }; + AVFilter avfilter_vf_yadif = { .name = "yadif", .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), @@ -504,4 +497,5 @@ AVFilter avfilter_vf_yadif = { .outputs = avfilter_vf_yadif_outputs, .priv_class = &yadif_class, + .shorthand = shorthand, }; |