aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-12-24 18:15:17 +0100
committerMax Kellermann <max@duempel.org>2011-12-24 18:15:17 +0100
commit43c5058682e5e365204469b469d6bd0db12b71f9 (patch)
tree196f41bc75f9deaff3398d52ed795fc5bb0765cb /src/output
parent99949c8f6fad1e2ef6aec5b742c8048d67b8280c (diff)
parent97b4a6b51f146b16eeac9334605f8a6fff1c0af7 (diff)
downloadmpd-43c5058682e5e365204469b469d6bd0db12b71f9.tar.gz
mpd-43c5058682e5e365204469b469d6bd0db12b71f9.tar.xz
mpd-43c5058682e5e365204469b469d6bd0db12b71f9.zip
Merge branch 'v0.16.x'
Diffstat (limited to 'src/output')
-rw-r--r--src/output/osx_output_plugin.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/output/osx_output_plugin.c b/src/output/osx_output_plugin.c
index f07aedc08..93f784a48 100644
--- a/src/output/osx_output_plugin.c
+++ b/src/output/osx_output_plugin.c
@@ -152,7 +152,6 @@ osx_render(void *vdata,
g_mutex_lock(od->mutex);
bytes_to_copy = MIN(od->len, buffer_size);
- buffer_size = bytes_to_copy;
od->len -= bytes_to_copy;
trailer_length = od->buffer_size - od->pos;
@@ -174,11 +173,9 @@ osx_render(void *vdata,
g_cond_signal(od->condition);
g_mutex_unlock(od->mutex);
- buffer->mDataByteSize = buffer_size;
-
- if (!buffer_size) {
- g_usleep(1000);
- }
+ if (bytes_to_copy < buffer_size)
+ memset((unsigned char*)buffer->mData + bytes_to_copy, 0,
+ buffer_size - bytes_to_copy);
return 0;
}