player/Thread: eliminate LockWaitDecoderStartup()
This commit is contained in:
@@ -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()) {
|
||||||
|
Reference in New Issue
Block a user