decoder/Control: throw exception on Seek() error

This commit is contained in:
Max Kellermann
2016-11-07 09:03:17 +01:00
parent 403f0f8c64
commit 4cd21f1e07
4 changed files with 18 additions and 21 deletions

View File

@@ -618,10 +618,12 @@ Player::SeekDecoder()
where = total_time;
}
Error error;
if (!dc.Seek(where + start_time, error)) {
try {
dc.Seek(where + start_time);
} catch (...) {
/* decoder failure */
pc.SetError(PlayerError::DECODER, std::move(error));
pc.SetError(PlayerError::DECODER,
std::current_exception());
pc.LockCommandFinished();
return false;
}