[tracker/rss-enclosures] tracker-extract-gstreamer: Use integer division for rounding
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] tracker-extract-gstreamer: Use integer division for rounding
- Date: Wed, 24 Nov 2010 01:40:14 +0000 (UTC)
commit 2488199e0e987f5ec7d959501829390ade48d11f
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]