Originally committed as revision 25332 to svn://svn.ffmpeg.org/ffmpeg/trunk
#define LIBAVUTIL_VERSION_MAJOR 50
#define LIBAVUTIL_VERSION_MINOR 32
-#define LIBAVUTIL_VERSION_MICRO 0
+#define LIBAVUTIL_VERSION_MICRO 1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
int64_t den;
if (isnan(d))
return (AVRational){0,0};
+ if (isinf(d))
+ return (AVRational){ d<0 ? -1:1, 0 };
exponent = FFMAX( (int)(log(fabs(d) + 1e-20)/LOG2), 0);
den = 1LL << (61 - exponent);
av_reduce(&a.num, &a.den, (int64_t)(d * den + 0.5), den, max);
/**
* Convert a double precision floating point number to a rational.
+ * inf is expressed as {1,0} or {-1,0} depending on the sign.
+ *
* @param d double to convert
* @param max the maximum allowed numerator and denominator
* @return (AVRational) d