summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/floatcast
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/floatcast')
-rw-r--r--gst-libs/gst/floatcast/floatcast.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/floatcast/floatcast.h b/gst-libs/gst/floatcast/floatcast.h
index 99577d91..ae87a43f 100644
--- a/gst-libs/gst/floatcast/floatcast.h
+++ b/gst-libs/gst/floatcast/floatcast.h
@@ -52,8 +52,8 @@ G_BEGIN_DECLS
#else
/* use a standard c cast, but do rounding correctly */
- #define gst_cast_float(x) ((x)>=0?(gint)((x)+0.5):(gint)((x)-0.5))
- #define gst_cast_double(x) ((x)>=0?(gint)((x)+0.5):(gint)((x)-0.5))
+ #define gst_cast_float(x) ((gint)floor((x)+0.5))
+ #define gst_cast_double(x) ((gint)floor((x)+0.5))
#endif