decoder/pcm: fix potential assertion failure in FillBuffer()
After a seek failure, the buffer may still be full, and then FillBuffer() aborts with assertion failure.
This commit is contained in:
parent
0a7d612f41
commit
7b7fb5acd5
@ -43,7 +43,8 @@ FillBuffer(DecoderClient &client, InputStream &is, B &buffer)
|
||||
{
|
||||
buffer.Shift();
|
||||
auto w = buffer.Write();
|
||||
assert(!w.IsEmpty());
|
||||
if (w.IsEmpty())
|
||||
return true;
|
||||
|
||||
size_t nbytes = decoder_read(client, is, w.data, w.size);
|
||||
if (nbytes == 0 && is.LockIsEOF())
|
||||
|
Loading…
Reference in New Issue
Block a user