summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-06 17:38:59 -0700
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2020-04-09 00:59:21 +0200
commit8beb9e571ca6fb38d5f784bedd581398fb3da06f (patch)
tree29e3c653ba10fb8f1f4a39fe7f123d48803379fc
parentdf4e008995a454576c7197b2969c552e96580da8 (diff)
avfilter/vf_drawtext: only test available exceptions
soft float systems do not define these macros under musl. Fixes: Ticket7102 Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--libavfilter/vf_drawtext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 887a686d16..abe1ca6c35 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1085,10 +1085,12 @@ static int func_eval_expr_int_format(AVFilterContext *ctx, AVBPrint *bp,
feclearexcept(FE_ALL_EXCEPT);
intval = res;
+#if defined(FE_INVALID) && defined(FE_OVERFLOW) && defined(FE_UNDERFLOW)
if ((ret = fetestexcept(FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW))) {
av_log(ctx, AV_LOG_ERROR, "Conversion of floating-point result to int failed. Control register: 0x%08x. Conversion result: %d\n", ret, intval);
return AVERROR(EINVAL);
}
+#endif
if (argc == 3)
av_strlcatf(fmt_str, sizeof(fmt_str), "0%u", positions);