player/Thread: merge two mutex locks
This commit is contained in:
@@ -625,14 +625,14 @@ Player::SeekDecoder() noexcept
|
|||||||
where = total_time;
|
where = total_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::lock_guard<Mutex> lock(pc.mutex);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const PlayerControl::ScopeOccupied occupied(pc);
|
const PlayerControl::ScopeOccupied occupied(pc);
|
||||||
|
|
||||||
const std::lock_guard<Mutex> lock(pc.mutex);
|
|
||||||
dc.Seek(where + start_time);
|
dc.Seek(where + start_time);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
/* decoder failure */
|
/* decoder failure */
|
||||||
const std::lock_guard<Mutex> lock(pc.mutex);
|
|
||||||
pc.SetError(PlayerError::DECODER,
|
pc.SetError(PlayerError::DECODER,
|
||||||
std::current_exception());
|
std::current_exception());
|
||||||
pc.CommandFinished();
|
pc.CommandFinished();
|
||||||
|
Reference in New Issue
Block a user