aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/output/osx_output_plugin.c10
2 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index c08a779e..b280e616 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
ver 0.17.3 (2012/??/??)
* output:
+ - osx: fix pops during playback
- recorder: fix I/O error check
- shout: fix memory leak in error handler
- recorder, shout: support Ogg packets that span more than one page
diff --git a/src/output/osx_output_plugin.c b/src/output/osx_output_plugin.c
index fbba8174..cd51fca2 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;
}