Commit c042faab authored by Max Kellermann's avatar Max Kellermann

player: request new song only if there is no pending command

Request the next song from the playlist (by clearing pc.next_song) only if the player command is empty. If it is not, the player may be clearing the song that has already been queued, leading to an assertion failure.
parent be90199c
...@@ -314,7 +314,8 @@ static void do_play(void) ...@@ -314,7 +314,8 @@ static void do_play(void)
} }
if (decoder_is_idle() && !player.queued && if (decoder_is_idle() && !player.queued &&
pc.next_song != NULL) { pc.next_song != NULL &&
pc.command == PLAYER_COMMAND_NONE) {
/* the decoder has finished the current song; /* the decoder has finished the current song;
request the next song from the playlist */ request the next song from the playlist */
pc.next_song = NULL; pc.next_song = NULL;
......
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