[rhythmbox] shell-player: calculate duration properly when not supplied by the player



commit c1d67f577401609391d26788e36ae8cbef1fbff8
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Nov 15 19:51:13 2009 +1000

    shell-player: calculate duration properly when not supplied by the player
    
    Another gint64 cast failure.  This was breaking playback of ogg vorbis
    over HTTP, amongst other things.

 shell/rb-shell-player.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/shell/rb-shell-player.c b/shell/rb-shell-player.c
index 7042c3a..9201b52 100644
--- a/shell/rb-shell-player.c
+++ b/shell/rb-shell-player.c
@@ -3494,7 +3494,7 @@ tick_cb (RBPlayer *mmplayer,
 	 * value from the entry, if any.
 	 */
 	if (duration < 1) {
-		duration = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_DURATION) * RB_PLAYER_SECOND;
+		duration = ((gint64)rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_DURATION)) * RB_PLAYER_SECOND;
 		duration_from_player = FALSE;
 	}
 



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