[FFmpeg-devel] [PATCH] avfilter/vf_tonemap: don't use NAN constant as an initializer
James Almer
jamrial at gmail.com
Thu Sep 7 04:59:13 EEST 2017
Netbsd:
src/libavfilter/vf_tonemap.c:314: error: initializer element is not constant
src/libavfilter/vf_tonemap.c:314: error: (near initialization for 'tonemap_options[8].default_val.dbl')
DJGPP
src/libavfilter/vf_tonemap.c:314:87: error: initializer element is not constant
{ "param", "tonemap parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, DBL_MIN, DBL_MAX, FLAGS },
^
src/libavfilter/vf_tonemap.c:314:87: note: (near initialization for 'tonemap_options[8].default_val.dbl')
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavfilter/vf_tonemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c
index 10308bdb16..d2c7ffa831 100644
--- a/libavfilter/vf_tonemap.c
+++ b/libavfilter/vf_tonemap.c
@@ -311,7 +311,7 @@ static const AVOption tonemap_options[] = {
{ "reinhard", 0, 0, AV_OPT_TYPE_CONST, {.i64 = TONEMAP_REINHARD}, 0, 0, FLAGS, "tonemap" },
{ "hable", 0, 0, AV_OPT_TYPE_CONST, {.i64 = TONEMAP_HABLE}, 0, 0, FLAGS, "tonemap" },
{ "mobius", 0, 0, AV_OPT_TYPE_CONST, {.i64 = TONEMAP_MOBIUS}, 0, 0, FLAGS, "tonemap" },
- { "param", "tonemap parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, DBL_MIN, DBL_MAX, FLAGS },
+ { "param", "tonemap parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl = nan("")}, DBL_MIN, DBL_MAX, FLAGS },
{ "desat", "desaturation strength", OFFSET(desat), AV_OPT_TYPE_DOUBLE, {.dbl = 2}, 0, DBL_MAX, FLAGS },
{ "peak", "signal peak override", OFFSET(peak), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, DBL_MAX, FLAGS },
{ NULL }
--
2.13.3
More information about the ffmpeg-devel
mailing list