player/Thread: eliminate LockWaitDecoderStartup()

This commit is contained in:
Max Kellermann
2017-12-22 00:58:42 +01:00
parent 1f0770ca55
commit 08b4a7aaf2

View File

@@ -231,11 +231,6 @@ private:
return true; return true;
} }
bool LockWaitDecoderStartup() noexcept {
const std::lock_guard<Mutex> lock(pc.mutex);
return WaitDecoderStartup();
}
/** /**
* Stop the decoder and clears (and frees) its music pipe. * Stop the decoder and clears (and frees) its music pipe.
* *
@@ -641,7 +636,8 @@ Player::SeekDecoder() noexcept
StartDecoder(*pipe); StartDecoder(*pipe);
ActivateDecoder(); ActivateDecoder();
if (!LockWaitDecoderStartup()) const std::lock_guard<Mutex> lock(pc.mutex);
if (!WaitDecoderStartup())
return false; return false;
} else { } else {
if (!IsDecoderAtCurrentSong()) { if (!IsDecoderAtCurrentSong()) {