Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-26 03:00:15 +0400
committerClément Bœsch <ubitux@gmail.com>2013-03-26 03:04:06 +0400
commit183f3450fda08ecccd824c1e44936c6c0a7262e4 (patch)
treed0ab488fe745b85b93c40974f595f483aeced421 /libavfilter
parentdc65d784df4071b772d6f6967fa79767d6ad4fae (diff)
lavfi/curves: support preset shorthand.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/version.h2
-rw-r--r--libavfilter/vf_curves.c10
2 files changed, 4 insertions, 8 deletions
diff --git a/libavfilter/version.h b/libavfilter/version.h
index d0ed722c19..ce6d874310 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 48
-#define LIBAVFILTER_VERSION_MICRO 103
+#define LIBAVFILTER_VERSION_MICRO 104
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c
index d83b7024f0..6137262d54 100644
--- a/libavfilter/vf_curves.c
+++ b/libavfilter/vf_curves.c
@@ -287,12 +287,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
CurvesContext *curves = ctx->priv;
struct keypoint *comp_points[NB_COMP] = {0};
- curves->class = &curves_class;
- av_opt_set_defaults(curves);
-
- if ((ret = av_set_options_string(curves, args, "=", ":")) < 0)
- return ret;
-
if (curves->preset) {
char **pts = curves->comp_points_str;
if (pts[0] || pts[1] || pts[2]) {
@@ -354,7 +348,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
}
}
- av_opt_free(curves);
return 0;
}
@@ -424,6 +417,8 @@ static const AVFilterPad curves_outputs[] = {
{ NULL }
};
+static const char *const shorthand[] = { "preset", NULL };
+
AVFilter avfilter_vf_curves = {
.name = "curves",
.description = NULL_IF_CONFIG_SMALL("Adjust components curves."),
@@ -433,4 +428,5 @@ AVFilter avfilter_vf_curves = {
.inputs = curves_inputs,
.outputs = curves_outputs,
.priv_class = &curves_class,
+ .shorthand = shorthand,
};