aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-01-28 14:50:26 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-01-28 14:50:26 +0000
commitea937d01410f07badd6e39b9079205c5ea40a9e4 (patch)
tree276f40c869776e6bd33955e85a2f21efc0d244d9
parentd44b50b0af724a37e6a2df7ba2c075d1f14fe818 (diff)
downloadffmpeg-ea937d01410f07badd6e39b9079205c5ea40a9e4.tar.gz
win32: rint() does not seem to be defined with mingw32-gcc 2.95 - do you have a better solution ?
Originally committed as revision 1519 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/dsputil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index b442501a3b..665bdac69e 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -331,7 +331,12 @@ static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int st
/* btw, rintf() is existing on fbsd too -- alex */
static inline long int lrintf(float x)
{
+#ifdef CONFIG_WIN32
+ /* XXX: incorrect, but make it compile */
+ return (int)(x);
+#else
return (int)(rint(x));
+#endif
}
#endif