Commit ea8ab4dd authored by Max Kellermann's avatar Max Kellermann

player/Thread: merge two mutex locks

parent 4bcc38c7
......@@ -610,6 +610,8 @@ Player::SeekDecoder() noexcept
ClearAndReplacePipe(dc.pipe);
}
const std::lock_guard<Mutex> lock(pc.mutex);
const SongTime start_time = pc.next_song->GetStartTime();
pc.next_song.reset();
queued = false;
......@@ -618,7 +620,7 @@ Player::SeekDecoder() noexcept
(just in case that happens to be still in
progress) */
if (!LockWaitDecoderStartup())
if (!WaitDecoderStartup())
return false;
/* send the SEEK command */
......@@ -630,8 +632,6 @@ Player::SeekDecoder() noexcept
where = total_time;
}
const std::lock_guard<Mutex> lock(pc.mutex);
try {
const PlayerControl::ScopeOccupied occupied(pc);
......
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