Merge branch 'sles-assert-fix' of git://github.com/tguillem/MPD-1

This commit is contained in:
Max Kellermann 2020-03-22 10:51:28 +01:00
commit d54acbcffd

View File

@ -322,8 +322,9 @@ SlesOutput::Play(const void *chunk, size_t size)
assert(filled < BUFFER_SIZE);
cond.wait(lock, [this]{
assert(filled == 0);
return n_queued != N_BUFFERS;
bool ret = n_queued != N_BUFFERS;
assert(ret || filled == 0);
return ret;
});
size_t nbytes = std::min(BUFFER_SIZE - filled, size);