[tracker] tracker-extract-gstreamer: Use integer division for rounding



commit 685d9099fdaaf525b6b523d15c4d333554cc0198
Author: Jürg Billeter <j bitron ch>
Date:   Fri Sep 3 17:16:49 2010 +0200

    tracker-extract-gstreamer: Use integer division for rounding

 src/tracker-extract/tracker-extract-gstreamer.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index b04c2c6..7cfe014 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -26,9 +26,6 @@
 #include <stdlib.h>
 #include <math.h>
 
-/* I don't know why, but this prototype ain't in my math.h */
-long long int llroundl(long double x);
-
 #include <glib.h>
 #include <glib/gstdio.h>
 
@@ -330,7 +327,7 @@ add_time_gst_tag (TrackerSparqlBuilder   *metadata,
 	if (ret) {
 		gint64 duration;
 
-		duration = llroundl ((long double) n / (long double) GST_SECOND);
+		duration = (n + (GST_SECOND / 2)) / GST_SECOND;
 
 		tracker_sparql_builder_predicate (metadata, key);
 		tracker_sparql_builder_object_int64 (metadata, duration);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]