OSDN Git Service

player: Only emit PropertiesChanged for Position if track exists
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 26 Feb 2013 12:33:42 +0000 (14:33 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 5 Mar 2013 09:23:42 +0000 (11:23 +0200)
profiles/audio/player.c

index 82b579f..b77c349 100644 (file)
@@ -814,6 +814,10 @@ void media_player_set_position(struct media_player *mp, uint32_t position)
 {
        DBG("%u", position);
 
+       /* Only update duration if track exists */
+       if (g_hash_table_size(mp->track) == 0)
+               return;
+
        mp->position = position;
        g_timer_start(mp->progress);