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 ...@@ -605,7 +605,6 @@ Player::SeekDecoder(SongTime seek_time) noexcept
} catch (...) { } catch (...) {
/* decoder failure */ /* decoder failure */
pc.SetError(PlayerError::DECODER, std::current_exception()); pc.SetError(PlayerError::DECODER, std::current_exception());
pc.CommandFinished();
return false; return false;
} }
...@@ -658,9 +657,11 @@ Player::SeekDecoder() noexcept ...@@ -658,9 +657,11 @@ Player::SeekDecoder() noexcept
/* send the SEEK command */ /* send the SEEK command */
if (!SeekDecoder(pc.seek_time)) if (!SeekDecoder(pc.seek_time)) {
pc.CommandFinished();
return false; return false;
} }
}
pc.CommandFinished(); 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