[rhythmbox] mpris: don't let the position value overflow
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] mpris: don't let the position value overflow
- Date: Sun, 16 Nov 2014 12:45:45 +0000 (UTC)
commit 63f7c469869c9c9eea0a61ef68f985edbd6e4481
Author: Jonathan Matthew <jonathan d14n org>
Date: Sun Nov 16 22:43:40 2014 +1000
mpris: don't let the position value overflow
2^32 microseconds is a bit over an hour, so this is quite noticeable.
plugins/mpris/rb-mpris-plugin.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/mpris/rb-mpris-plugin.c b/plugins/mpris/rb-mpris-plugin.c
index 38b3959..2245569 100644
--- a/plugins/mpris/rb-mpris-plugin.c
+++ b/plugins/mpris/rb-mpris-plugin.c
@@ -852,7 +852,7 @@ get_player_property (GDBusConnection *connection,
guint t;
ret = rb_shell_player_get_playing_time (plugin->player, &t, error);
if (ret) {
- return g_variant_new_int64 (t * G_USEC_PER_SEC);
+ return g_variant_new_int64 ((gint64)t * G_USEC_PER_SEC);
} else {
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]