Commit 25c04a97 authored by Emanuele Giaquinta's avatar Emanuele Giaquinta Committed by Max Kellermann

Remove useless computation. After the pthread_cond_wait loop there are at least…

Remove useless computation. After the pthread_cond_wait loop there are at least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size).
parent c584d6b0
...@@ -330,8 +330,6 @@ osx_play(void *data, const char *playChunk, size_t size) ...@@ -330,8 +330,6 @@ osx_play(void *data, const char *playChunk, size_t size)
pthread_cond_wait(&od->condition, &od->mutex); pthread_cond_wait(&od->condition, &od->mutex);
} }
bytesToCopy = od->bufferSize - od->len;
bytesToCopy = bytesToCopy < size ? bytesToCopy : size;
size -= bytesToCopy; size -= bytesToCopy;
od->len += bytesToCopy; od->len += bytesToCopy;
......
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