diff options
-rw-r--r-- | src/outputBuffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c index d8c4e816a..9d77caf3a 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -161,10 +161,13 @@ static int tailChunk(OutputBuffer * cb, InputStream * inStream, if (chunk->chunkSize == sizeof(chunk->data)) { /* this chunk is full; allocate a new chunk */ next = successor(cb, cb->end); - while (cb->begin == next && !dc->stop) { + while (cb->begin == next) { /* all chunks are full of decoded data; wait for the player to free one */ + if (dc->stop) + return OUTPUT_BUFFER_DC_STOP; + if (dc->seek) { if (seekable) { return OUTPUT_BUFFER_DC_SEEK; @@ -180,9 +183,6 @@ static int tailChunk(OutputBuffer * cb, InputStream * inStream, } } - if (dc->stop) - return OUTPUT_BUFFER_DC_STOP; - output_buffer_expand(cb, next); chunk = outputBufferGetChunk(cb, next); assert(chunk->chunkSize == 0); |