aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 22:56:11 +0200
committerMax Kellermann <max@duempel.org>2012-08-15 22:56:11 +0200
commit8422402c39d523c8ce9336e9ecf52950f1905bce (patch)
tree4c5d3778768890e192685bd9b02f251b9cf85cbf /src/playlist.c
parentb5fde6dfa55676560ee8805e8e00bc188a5ad928 (diff)
parent9374e0f4454ff5a37f70ce2d6110d5612856a169 (diff)
downloadmpd-8422402c39d523c8ce9336e9ecf52950f1905bce.tar.gz
mpd-8422402c39d523c8ce9336e9ecf52950f1905bce.tar.xz
mpd-8422402c39d523c8ce9336e9ecf52950f1905bce.zip
Merge branch 'v0.17.x'
Conflicts: src/player_thread.c
Diffstat (limited to 'src/playlist.c')
-rw-r--r--src/playlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index b2cb90d2f..4c95bc7ce 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -239,9 +239,13 @@ playlist_sync(struct playlist *playlist, struct player_control *pc)
if (pc_next_song == NULL && playlist->queued != -1)
playlist_song_started(playlist, pc);
+ player_lock(pc);
+ pc_next_song = pc->next_song;
+ player_unlock(pc);
+
/* make sure the queued song is always set (if
possible) */
- if (pc->next_song == NULL && playlist->queued < 0)
+ if (pc_next_song == NULL && playlist->queued < 0)
playlist_update_queued_song(playlist, pc, NULL);
}
}