diff options
Diffstat (limited to '')
-rw-r--r-- | src/outputBuffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 40777db3b..39d9b66af 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -42,7 +42,6 @@ void clearOutputBuffer(OutputBuffer * cb) { currentChunk = -1; cb->end = cb->begin; - cb->wrap = 0; /* be sure to reset metaChunkSets cause we are skipping over audio * audio chunks, and thus skipping over metadata */ @@ -60,7 +59,6 @@ void flushOutputBuffer(OutputBuffer * cb) { cb->end++; if(cb->end>=buffered_chunks) { cb->end = 0; - cb->wrap = 1; } currentChunk = -1; } @@ -97,8 +95,11 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, while(datalen) { if(currentChunk != cb->end) { - while(cb->begin==cb->end && cb->wrap && !dc->stop) - { + int next = cb->end+1; + if(next>=buffered_chunks) { + next = 0; + } + while(cb->begin==next && !dc->stop) { if(dc->seek) { if(seekable) { return OUTPUT_BUFFER_DC_SEEK; |