Ticket #4796: ffmpeg-2.6.3-uclibc.patch

File ffmpeg-2.6.3-uclibc.patch, 923 bytes (added by René Rhéaume, 11 years ago)
  • libavfilter/vf_drawtext.c

    old new static int func_eval_expr_int_format(AVF  
    921921        }
    922922    }
    923923
     924#ifdef __UCLIBC__
     925    if (isfinite(res) && (res <= 2147483647.0) && (res >= -2147483647.0)) {
     926        intval = res;
     927    } else {
     928        av_log(ctx, AV_LOG_ERROR,
     929               "Conversion of floating-point result to int failed. Conversion result: %d\n",
     930               intval);
     931        return AVERROR(EINVAL);
     932    }
     933#else
    924934    feclearexcept(FE_ALL_EXCEPT);
    925935    intval = res;
    926936    if ((ret = fetestexcept(FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW))) {
    927937        av_log(ctx, AV_LOG_ERROR, "Conversion of floating-point result to int failed. Control register: 0x%08x. Conversion result: %d\n", ret, intval);
    928938        return AVERROR(EINVAL);
    929939    }
     940#endif
    930941
    931942    if (argc == 3)
    932943        av_strlcatf(fmt_str, sizeof(fmt_str), "0%u", positions);