player_thread: finish failed seek command

When seeking into a new song, and the decoder for the new song fails
to start up, MPD forgot to send the "command_finished" signal to the
main thread.
This commit is contained in:
Max Kellermann 2009-03-10 18:04:09 +01:00
parent c6a43b691f
commit 92d74d4a78

View File

@ -226,6 +226,8 @@ static bool player_seek_decoder(struct player *player)
double where;
bool ret;
assert(pc.next_song != NULL);
if (decoder_current_song() != pc.next_song) {
player_dc_stop(player);
@ -234,8 +236,10 @@ static bool player_seek_decoder(struct player *player)
dc_start_async(pc.next_song);
ret = player_wait_for_decoder(player);
if (!ret)
if (!ret) {
player_command_finished();
return false;
}
} else {
pc.next_song = NULL;
player->queued = false;