aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-08 22:09:25 +0200
committerMax Kellermann <max@duempel.org>2009-10-08 22:09:25 +0200
commit47b5e73a151f1ccc506f454eaafc5c65885ff0a3 (patch)
tree7a15f669abd4292e9468d70f168eefc59d600564 /src
parentd6a6f428b3f9ddc13492951e2ed1699def516214 (diff)
downloadmpd-47b5e73a151f1ccc506f454eaafc5c65885ff0a3.tar.gz
mpd-47b5e73a151f1ccc506f454eaafc5c65885ff0a3.tar.xz
mpd-47b5e73a151f1ccc506f454eaafc5c65885ff0a3.zip
player_thread: always clear player_control.next_song on return
pc.next_song might be non-NULL even if player.queued==true: when the decoder has started decoding the next song, but the result hasn't been read yet.
Diffstat (limited to '')
-rw-r--r--src/player_thread.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 412ae9b5e..7368b4d4b 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -750,13 +750,11 @@ static void do_play(void)
}
}
- if (player.queued) {
- assert(pc.next_song != NULL);
- pc.next_song = NULL;
- }
-
player_dc_stop(&player);
+ assert(!player.queued || pc.next_song != NULL);
+ pc.next_song = NULL;
+
music_pipe_clear(player.pipe, player_buffer);
music_pipe_free(player.pipe);