Diff between 283dc309af89c26f1b1c20780cde7ffd6e2f8f7e and 9022e5363d630a44334ff9c0c190b8c6f43b57a5

Changed Files

File Additions Deletions Status
profiles/audio/player.c +4 -0 modified

Full Patch

diff --git a/profiles/audio/player.c b/profiles/audio/player.c
index 82b579f..b77c349 100644
--- a/profiles/audio/player.c
+++ b/profiles/audio/player.c
@@ -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);