diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-03-26 00:00:15 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-03-26 00:04:06 +0100 |
commit | 183f3450fda08ecccd824c1e44936c6c0a7262e4 (patch) | |
tree | d0ab488fe745b85b93c40974f595f483aeced421 /libavfilter/vf_curves.c | |
parent | dc65d784df4071b772d6f6967fa79767d6ad4fae (diff) | |
download | ffmpeg-streaming-183f3450fda08ecccd824c1e44936c6c0a7262e4.zip ffmpeg-streaming-183f3450fda08ecccd824c1e44936c6c0a7262e4.tar.gz |
lavfi/curves: support preset shorthand.
Diffstat (limited to 'libavfilter/vf_curves.c')
-rw-r--r-- | libavfilter/vf_curves.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c index d83b702..6137262 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, }; |