You need to sign in or sign up before continuing.
Commit c069b89d authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

use unsigned integers in outputBuffer.c

The chunk index cannot be negative. git-svn-id: https://svn.musicpd.org/mpd/trunk@7231 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent b60789dd
...@@ -118,7 +118,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, ...@@ -118,7 +118,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
while (datalen) { while (datalen) {
if (currentChunk != cb->end) { if (currentChunk != cb->end) {
int next = cb->end + 1; unsigned int next = cb->end + 1;
if (next >= buffered_chunks) { if (next >= buffered_chunks) {
next = 0; next = 0;
} }
......
...@@ -38,8 +38,8 @@ typedef struct _OutputBuffer { ...@@ -38,8 +38,8 @@ typedef struct _OutputBuffer {
mpd_uint16 *volatile chunkSize; mpd_uint16 *volatile chunkSize;
mpd_uint16 *volatile bitRate; mpd_uint16 *volatile bitRate;
float *volatile times; float *volatile times;
mpd_sint16 volatile begin; mpd_uint16 volatile begin;
mpd_sint16 volatile end; mpd_uint16 volatile end;
AudioFormat audioFormat; AudioFormat audioFormat;
ConvState convState; ConvState convState;
MetadataChunk metadataChunks[BUFFERED_METACHUNKS]; MetadataChunk metadataChunks[BUFFERED_METACHUNKS];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment