summaryrefslogtreecommitdiff
path: root/libavfilter/vf_setfield.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-24 09:11:48 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-24 12:26:25 +0100
commit15878b2b5ba7d70106e5b63a86e16bb736008e12 (patch)
treec5e943ca71b9ab076c0d04610c288740ea95332e /libavfilter/vf_setfield.c
parente62587bc5e72fd77a0463c16b55ccefd2982eb6f (diff)
lavfi/setfield: use standard options parsing.
Diffstat (limited to 'libavfilter/vf_setfield.c')
-rw-r--r--libavfilter/vf_setfield.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/libavfilter/vf_setfield.c b/libavfilter/vf_setfield.c
index bb97a8419e..22b3101b7b 100644
--- a/libavfilter/vf_setfield.c
+++ b/libavfilter/vf_setfield.c
@@ -54,23 +54,6 @@ static const AVOption setfield_options[] = {
AVFILTER_DEFINE_CLASS(setfield);
-static av_cold int init(AVFilterContext *ctx, const char *args)
-{
- SetFieldContext *setfield = ctx->priv;
- static const char *shorthand[] = { "mode", NULL };
-
- setfield->class = &setfield_class;
- av_opt_set_defaults(setfield);
-
- return av_opt_set_from_string(setfield, args, shorthand, "=", ":");
-}
-
-static av_cold void uninit(AVFilterContext *ctx)
-{
- SetFieldContext *setfield = ctx->priv;
- av_opt_free(setfield);
-}
-
static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
{
SetFieldContext *setfield = inlink->dst->priv;
@@ -102,14 +85,14 @@ static const AVFilterPad setfield_outputs[] = {
{ NULL }
};
+static const char *const shorthand[] = { "mode", NULL };
+
AVFilter avfilter_vf_setfield = {
.name = "setfield",
.description = NULL_IF_CONFIG_SMALL("Force field for the output video frame."),
- .init = init,
- .uninit = uninit,
-
.priv_size = sizeof(SetFieldContext),
.inputs = setfield_inputs,
.outputs = setfield_outputs,
.priv_class = &setfield_class,
+ .shorthand = shorthand,
};