From 64fa2166c814587f53bbd49b76a2238e38230891 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 23 Jul 2013 15:52:31 +0300 Subject: [PATCH] audio/media: Fix not updating position The status may not be 'playing' as MPRIS documents it as 'Playing' instead, to make this less prone to typos like this the code now uses strcasecmp. --- profiles/audio/media.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index f1ad43926..715d49c65 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -1131,7 +1131,7 @@ static uint32_t get_position(void *user_data) double timedelta; uint32_t sec, msec; - if (g_strcmp0(mp->status, "playing") != 0) + if (mp->status == NULL || strcasecmp(mp->status, "Playing") != 0) return mp->position; timedelta = g_timer_elapsed(mp->timer, NULL); -- 2.47.3