Ticket #2425: libavutil-timestamp-c.patch

File libavutil-timestamp-c.patch, 738 bytes (added by Mike Lieman, 21 months ago)

patch for ffmpeg/libavutil/timestamp.c

  • libavutil/timestamp.c

    diff --git a/libavutil/timestamp.c b/libavutil/timestamp.c
    index 6c231a517d..eab2531538 100644
    a b char *av_ts_make_time_string2(char *buf, int64_t ts, AVRational tb)  
    2424        snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
    2525    } else {
    2626        double val = av_q2d(tb) * ts;
    27         double log = (fpclassify(val) == FP_ZERO ? -INFINITY : floor(log10(fabs(val))));
     27        double log = (fpclassify(val) == FP_ZERO ? FP_INFINITE : floor(log10(fabs(val))));
    2828        int precision = (isfinite(log) && log < 0) ? -log + 5 : 6;
    2929        int last = snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.*f", precision, val);
    3030        last = FFMIN(last, AV_TS_MAX_STRING_SIZE - 1) - 1;