You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

  1. From 8beb9e571ca6fb38d5f784bedd581398fb3da06f Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Mon, 6 Apr 2020 17:38:59 -0700
  4. Subject: [PATCH] avfilter/vf_drawtext: only test available exceptions
  5. soft float systems do not define these macros under musl.
  6. Fixes: Ticket7102
  7. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  8. ---
  9. libavfilter/vf_drawtext.c | 2 ++
  10. 1 file changed, 2 insertions(+)
  11. diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
  12. index 887a686d16d..abe1ca6c35c 100644
  13. --- a/libavfilter/vf_drawtext.c
  14. +++ b/libavfilter/vf_drawtext.c
  15. @@ -1083,10 +1083,12 @@ static int func_eval_expr_int_format(AVFilterContext *ctx, AVBPrint *bp,
  16. feclearexcept(FE_ALL_EXCEPT);
  17. intval = res;
  18. +#if defined(FE_INVALID) && defined(FE_OVERFLOW) && defined(FE_UNDERFLOW)
  19. if ((ret = fetestexcept(FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW))) {
  20. av_log(ctx, AV_LOG_ERROR, "Conversion of floating-point result to int failed. Control register: 0x%08x. Conversion result: %d\n", ret, intval);
  21. return AVERROR(EINVAL);
  22. }
  23. +#endif
  24. if (argc == 3)
  25. av_strlcatf(fmt_str, sizeof(fmt_str), "0%u", positions);