Commit a22c93b6 authored by Max Kellermann's avatar Max Kellermann

player_thread: on return, reset next_song only if queued

If no song was queued, then player_control.next_song might contain the value for the next QUEUE command. We must not reset that.
parent 507606bb
......@@ -889,14 +889,18 @@ static void do_play(struct decoder_control *dc)
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);
player_lock();
if (player.queued) {
assert(pc.next_song != NULL);
pc.next_song = NULL;
}
pc.state = PLAYER_STATE_STOP;
player_unlock();
event_pipe_emit(PIPE_EVENT_PLAYLIST);
......
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