player/Thread: stop buffering if buffer is full

Shouldn't ever happen, but who knows...
This commit is contained in:
Max Kellermann
2018-09-21 19:05:25 +02:00
parent a190db0873
commit 1d00d55d53
2 changed files with 7 additions and 2 deletions

View File

@@ -944,7 +944,7 @@ Player::Run() noexcept
prevent stuttering on slow machines */
if (pipe->GetSize() < pc.buffered_before_play &&
!dc.IsIdle()) {
!dc.IsIdle() && !buffer.IsFull()) {
/* not enough decoded buffer space yet */
dc.WaitForDecoder();