From 47b5e73a151f1ccc506f454eaafc5c65885ff0a3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Oct 2009 22:09:25 +0200 Subject: 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. --- src/player_thread.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/player_thread.c') diff --git a/src/player_thread.c b/src/player_thread.c index 412ae9b5..7368b4d4 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); -- cgit v1.2.3