player/Thread: move CommandFinished() call out of SeekDecoder(SongTime)
Decouple this function from player command execution.
This commit is contained in:
@@ -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,8 +657,10 @@ 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();
|
||||||
|
Reference in New Issue
Block a user