gst/gstvalue.c: floor is not needed, F is always positive; this obviates the need...
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 12 Dec 2005 10:59:12 +0000 (10:59 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 12 Dec 2005 10:59:12 +0000 (10:59 +0000)
Original commit message from CVS:

* gst/gstvalue.c: (gst_value_transform_double_fraction):
floor is not needed, F is always positive; this obviates the
need for adding -lm when building without libxml

ChangeLog
gst/gstvalue.c

index a6e1920..a05c8c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-12  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * gst/gstvalue.c: (gst_value_transform_double_fraction):
+         floor is not needed, F is always positive; this obviates the
+         need for adding -lm when building without libxml
+
 2005-12-12  Wim Taymans  <wim@fluendo.com>
 
        * libs/gst/base/gstbasesink.c: (gst_base_sink_get_position):
index 23543b2..8445f5b 100644 (file)
@@ -3430,7 +3430,7 @@ gst_value_transform_double_fraction (const GValue * src_value,
 
   for (i = 0; i < MAX_TERMS; i++) {
     /* get next term */
-    A = floor (F);
+    A = (gint) F;               /* no floor() needed, F is always >= 0 */
     /* get new divisor */
     F = F - A;