diff options
-rw-r--r-- | libavutil/rational.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/rational.c b/libavutil/rational.c index 6b3f50a02a..cab443818a 100644 --- a/libavutil/rational.c +++ b/libavutil/rational.c @@ -115,7 +115,8 @@ AVRational av_d2q(double d, int max) frexp(d, &exponent); exponent = FFMAX(exponent-1, 0); den = 1LL << (61 - exponent); - // (int64_t)rint() and llrint() do not work with gcc on ia64 and sparc64 + // (int64_t)rint() and llrint() do not work with gcc on ia64 and sparc64, + // see Ticket2713 for affected gcc/glibc versions av_reduce(&a.num, &a.den, floor(d * den + 0.5), den, max); if ((!a.num || !a.den) && d && max>0 && max<INT_MAX) av_reduce(&a.num, &a.den, floor(d * den + 0.5), den, INT_MAX); |