aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-24 09:18:18 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-24 12:26:25 +0100
commitcbf224b631b0f0054013564e2743a84d8c39f3c4 (patch)
tree29e3ea6039345f1cf86b3741f9e0b33ccf7d1b08
parent9e21c89841b9d461efd773753f54c60b157a8ac6 (diff)
downloadffmpeg-cbf224b631b0f0054013564e2743a84d8c39f3c4.tar.gz
lavfi/tinterlace: use standard options parsing.
-rw-r--r--libavfilter/vf_tinterlace.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index bce63010b4..5caca2f2c9 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -97,25 +97,12 @@ static int query_formats(AVFilterContext *ctx)
return 0;
}
-static av_cold int init(AVFilterContext *ctx, const char *args)
-{
- TInterlaceContext *tinterlace = ctx->priv;
- static const char *shorthand[] = { "mode", NULL };
-
- tinterlace->class = &tinterlace_class;
- av_opt_set_defaults(tinterlace);
-
- return av_opt_set_from_string(tinterlace, args, shorthand, "=", ":");
-}
-
static av_cold void uninit(AVFilterContext *ctx)
{
TInterlaceContext *tinterlace = ctx->priv;
av_frame_free(&tinterlace->cur );
av_frame_free(&tinterlace->next);
-
- av_opt_free(tinterlace);
av_freep(&tinterlace->black_data[0]);
}
@@ -396,14 +383,16 @@ static const AVFilterPad tinterlace_outputs[] = {
{ NULL }
};
+static const char *const shorthand[] = { "mode", NULL };
+
AVFilter avfilter_vf_tinterlace = {
.name = "tinterlace",
.description = NULL_IF_CONFIG_SMALL("Perform temporal field interlacing."),
.priv_size = sizeof(TInterlaceContext),
- .init = init,
.uninit = uninit,
.query_formats = query_formats,
.inputs = tinterlace_inputs,
.outputs = tinterlace_outputs,
.priv_class = &tinterlace_class,
+ .shorthand = shorthand,
};