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.
This commit is contained in:
Max Kellermann 2008-10-29 17:28:49 +01:00
parent be90199c5a
commit c042faab42

View File

@ -314,7 +314,8 @@ static void do_play(void)
}
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;
request the next song from the playlist */
pc.next_song = NULL;