Commit 47b5e73a authored by Max Kellermann's avatar Max Kellermann

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.
parent d6a6f428
...@@ -750,13 +750,11 @@ static void do_play(void) ...@@ -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); player_dc_stop(&player);
assert(!player.queued || pc.next_song != NULL);
pc.next_song = NULL;
music_pipe_clear(player.pipe, player_buffer); music_pipe_clear(player.pipe, player_buffer);
music_pipe_free(player.pipe); music_pipe_free(player.pipe);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment