Commit 8838bdc1 authored by Max Kellermann's avatar Max Kellermann

player/Thread: move CommandFinished() call out of SeekDecoder(SongTime)

Decouple this function from player command execution.
parent d6386bc8
......@@ -605,7 +605,6 @@ Player::SeekDecoder(SongTime seek_time) noexcept
} catch (...) {
/* decoder failure */
pc.SetError(PlayerError::DECODER, std::current_exception());
pc.CommandFinished();
return false;
}
......@@ -658,8 +657,10 @@ Player::SeekDecoder() noexcept
/* send the SEEK command */
if (!SeekDecoder(pc.seek_time))
if (!SeekDecoder(pc.seek_time)) {
pc.CommandFinished();
return false;
}
}
pc.CommandFinished();
......
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