aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/output/osx_output_plugin.c10
-rw-r--r--test/dump_playlist.c2
3 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 84d5866c..e4934332 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ ver 0.18 (2012/??/??)
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;
}
diff --git a/test/dump_playlist.c b/test/dump_playlist.c
index 28237a79..56687266 100644
--- a/test/dump_playlist.c
+++ b/test/dump_playlist.c
@@ -159,7 +159,7 @@ int main(int argc, char **argv)
config_global_init();
success = config_read_file(argv[1], &error);
if (!success) {
- g_printerr("%s:", error->message);
+ g_printerr("%s\n", error->message);
g_error_free(error);
return 1;
}