summaryrefslogtreecommitdiff
path: root/libavfilter/vf_curves.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-11 12:47:42 +0200
committerClément Bœsch <ubitux@gmail.com>2013-04-11 13:05:06 +0200
commit7e7dc1489f5e7b3810935f17ec3c9a7ca2beb68a (patch)
tree4f3c63ffa92f6a6644bc2f9225f3d263d5ce6da3 /libavfilter/vf_curves.c
parenta1e798ef0a5f5c4cfa58cef436a02e07fb238733 (diff)
lavfi/curves: make possible to customize presets.
Diffstat (limited to 'libavfilter/vf_curves.c')
-rw-r--r--libavfilter/vf_curves.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c
index d0a8ebc4e3..378754dfba 100644
--- a/libavfilter/vf_curves.c
+++ b/libavfilter/vf_curves.c
@@ -333,14 +333,9 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
}
if (curves->preset != PRESET_NONE) {
- if (pts[0] || pts[1] || pts[2]) {
- av_log(ctx, AV_LOG_ERROR, "It is not possible to mix a preset "
- "with explicit points placements\n");
- return AVERROR(EINVAL);
- }
- pts[0] = av_strdup(curves_presets[curves->preset].r);
- pts[1] = av_strdup(curves_presets[curves->preset].g);
- pts[2] = av_strdup(curves_presets[curves->preset].b);
+ if (!pts[0]) pts[0] = av_strdup(curves_presets[curves->preset].r);
+ if (!pts[1]) pts[1] = av_strdup(curves_presets[curves->preset].g);
+ if (!pts[2]) pts[2] = av_strdup(curves_presets[curves->preset].b);
if (!pts[0] || !pts[1] || !pts[2])
return AVERROR(ENOMEM);
}