Commit 92d74d4a authored by Max Kellermann's avatar Max Kellermann

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