diff options
author | Emanuele Giaquinta <e.giaquinta@glauco.it> | 2008-12-17 15:50:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-17 15:56:43 +0100 |
commit | 25c04a97d3bab513134d78153a0fb0c3ac0fd553 (patch) | |
tree | 30e432d3ef3c4586f0072b469f9bf2a071bbe9f3 /src/output/osx_plugin.c | |
parent | c584d6b087031db1afe28a0f6444aad7cd1a6d24 (diff) | |
download | mpd-25c04a97d3bab513134d78153a0fb0c3ac0fd553.tar.gz mpd-25c04a97d3bab513134d78153a0fb0c3ac0fd553.tar.xz mpd-25c04a97d3bab513134d78153a0fb0c3ac0fd553.zip |
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).
Diffstat (limited to 'src/output/osx_plugin.c')
-rw-r--r-- | src/output/osx_plugin.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/output/osx_plugin.c b/src/output/osx_plugin.c index a00fbdbdd..7af8be3a2 100644 --- a/src/output/osx_plugin.c +++ b/src/output/osx_plugin.c @@ -330,8 +330,6 @@ osx_play(void *data, const char *playChunk, size_t size) pthread_cond_wait(&od->condition, &od->mutex); } - bytesToCopy = od->bufferSize - od->len; - bytesToCopy = bytesToCopy < size ? bytesToCopy : size; size -= bytesToCopy; od->len += bytesToCopy; |