player/Thread: wake up the decoder when the pipe has run empty
This is another instance of the kludge we already have a few lines
above that. It works around a deadlock/race condition revealed by
commit 98a7c62d7a
This commit is contained in:
parent
edcd0b9913
commit
efb528f979
@ -1027,7 +1027,9 @@ Player::Run() noexcept
|
||||
/* wake up the decoder (just in case it's
|
||||
waiting for space in the MusicBuffer) and
|
||||
wait for it */
|
||||
// TODO: eliminate this kludge
|
||||
dc.Signal();
|
||||
|
||||
dc.WaitForDecoder();
|
||||
} else if (IsDecoderAtNextSong()) {
|
||||
/* at the beginning of a new song */
|
||||
@ -1049,6 +1051,12 @@ Player::Run() noexcept
|
||||
new PCM data in time: wait for the
|
||||
decoder */
|
||||
|
||||
/* wake up the decoder (just in case it's
|
||||
waiting for space in the MusicBuffer) and
|
||||
wait for it */
|
||||
// TODO: eliminate this kludge
|
||||
dc.Signal();
|
||||
|
||||
dc.WaitForDecoder();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user