aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-24 09:03:22 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-24 12:26:24 +0100
commitb595819cde01ac3ac6836bce7af8e841194eb6cd (patch)
tree2e2bd888737f9496f6c5e9b00a0baf3a0e751beb
parentcb0fb4d04df67367624a00f80ff0e73d67acafb0 (diff)
downloadffmpeg-b595819cde01ac3ac6836bce7af8e841194eb6cd.tar.gz
lavfi/geq: use standard options parsing.
-rw-r--r--libavfilter/vf_geq.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 373f0f0173..a6b48e1665 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -92,13 +92,6 @@ static av_cold int geq_init(AVFilterContext *ctx, const char *args)
{
GEQContext *geq = ctx->priv;
int plane, ret = 0;
- static const char *shorthand[] = { "lum_expr", "cb_expr", "cr_expr", "alpha_expr", NULL };
-
- geq->class = &geq_class;
- av_opt_set_defaults(geq);
-
- if ((ret = av_opt_set_from_string(geq, args, shorthand, "=", ":")) < 0)
- return ret;
if (!geq->expr_str[0]) {
av_log(ctx, AV_LOG_ERROR, "Luminance expression is mandatory\n");
@@ -215,7 +208,6 @@ static av_cold void geq_uninit(AVFilterContext *ctx)
for (i = 0; i < FF_ARRAY_ELEMS(geq->e); i++)
av_expr_free(geq->e[i]);
- av_opt_free(geq);
}
static const AVFilterPad geq_inputs[] = {
@@ -236,6 +228,8 @@ static const AVFilterPad geq_outputs[] = {
{ NULL }
};
+static const char *const shorthand[] = { "lum_expr", "cb_expr", "cr_expr", "alpha_expr", NULL };
+
AVFilter avfilter_vf_geq = {
.name = "geq",
.description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."),
@@ -246,4 +240,5 @@ AVFilter avfilter_vf_geq = {
.inputs = geq_inputs,
.outputs = geq_outputs,
.priv_class = &geq_class,
+ .shorthand = shorthand,
};