Commit 5becffbb authored by Max Kellermann's avatar Max Kellermann

player/Thread: merge two mutex locks

parent d0194a6f
......@@ -625,14 +625,14 @@ Player::SeekDecoder() noexcept
where = total_time;
}
const std::lock_guard<Mutex> lock(pc.mutex);
try {
const PlayerControl::ScopeOccupied occupied(pc);
const std::lock_guard<Mutex> lock(pc.mutex);
dc.Seek(where + start_time);
} catch (...) {
/* decoder failure */
const std::lock_guard<Mutex> lock(pc.mutex);
pc.SetError(PlayerError::DECODER,
std::current_exception());
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