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>
pull/336/head
Rosen Penev 5 years ago committed by Carl Eugen Hoyos
parent df4e008995
commit 8beb9e571c
  1. 2
      libavfilter/vf_drawtext.c

@ -1085,10 +1085,12 @@ static int func_eval_expr_int_format(AVFilterContext *ctx, AVBPrint *bp,
feclearexcept(FE_ALL_EXCEPT); feclearexcept(FE_ALL_EXCEPT);
intval = res; intval = res;
#if defined(FE_INVALID) && defined(FE_OVERFLOW) && defined(FE_UNDERFLOW)
if ((ret = fetestexcept(FE_INVALID|FE_OVERFLOW|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); 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); return AVERROR(EINVAL);
} }
#endif
if (argc == 3) if (argc == 3)
av_strlcatf(fmt_str, sizeof(fmt_str), "0%u", positions); av_strlcatf(fmt_str, sizeof(fmt_str), "0%u", positions);

Loading…
Cancel
Save