win32: rint() does not seem to be defined with mingw32-gcc 2.95 - do you have a bette...
authorFabrice Bellard <fabrice@bellard.org>
Tue, 28 Jan 2003 14:50:26 +0000 (14:50 +0000)
committerFabrice Bellard <fabrice@bellard.org>
Tue, 28 Jan 2003 14:50:26 +0000 (14:50 +0000)
Originally committed as revision 1519 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/dsputil.h

index b442501a3b94d5208b00861e59c8a8fe9582b8b7..665bdac69ed9b78f667dd9fced5c0e01c42a00ab 100644 (file)
@@ -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