aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/osx_output_plugin.c
diff options
context:
space:
mode:
authorGregory Smith <gasmith@vmware.com>2012-10-02 08:18:41 -0700
committerMax Kellermann <max@duempel.org>2012-10-02 17:27:52 +0200
commit03a401e4779a287d2760376a10ef4ea415803b00 (patch)
tree92feff600a8275625c651e0c1f35bb62a895cf77 /src/output/osx_output_plugin.c
parent9994521b8cbb15cc455d62e129a9c6cebdc7e42a (diff)
downloadmpd-03a401e4779a287d2760376a10ef4ea415803b00.tar.gz
mpd-03a401e4779a287d2760376a10ef4ea415803b00.tar.xz
mpd-03a401e4779a287d2760376a10ef4ea415803b00.zip
OSX: Set mDataByteSize correctly on AudioBuffers during render.
Diffstat (limited to 'src/output/osx_output_plugin.c')
-rw-r--r--src/output/osx_output_plugin.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/output/osx_output_plugin.c b/src/output/osx_output_plugin.c
index fbba81749..cd51fca20 100644
--- a/src/output/osx_output_plugin.c
+++ b/src/output/osx_output_plugin.c
@@ -228,9 +228,13 @@ osx_render(void *vdata,
g_cond_signal(od->condition);
g_mutex_unlock(od->mutex);
- if (nbytes < buffer_size)
- memset((unsigned char*)buffer->mData + nbytes, 0,
- buffer_size - nbytes);
+ buffer->mDataByteSize = nbytes;
+
+ unsigned i;
+ for (i = 1; i < buffer_list->mNumberBuffers; ++i) {
+ buffer = &buffer_list->mBuffers[i];
+ buffer->mDataByteSize = 0;
+ }
return 0;
}