summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-12-01 16:51:19 +0100
committerAlessandro Ghedini <alessandro@ghedini.me>2014-12-01 21:06:07 +0100
commitb9cfc3622c41de795c1f5e4cf2f931597ee7fb8f (patch)
tree354a669b7a5ad777c883184ebdfc7c26ed699306
parent1b0bf6507ec79afe503db3ffffa70039f5d6b85e (diff)
downloadmpv-b9cfc3622c41de795c1f5e4cf2f931597ee7fb8f.tar.bz2
mpv-b9cfc3622c41de795c1f5e4cf2f931597ee7fb8f.tar.xz
ao_coreaudio: initialize fetched properties to zeros
Should hopefully fix #1249 and #1279
-rw-r--r--audio/out/ao_coreaudio_properties.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao_coreaudio_properties.c b/audio/out/ao_coreaudio_properties.c
index 67287e7427..181d338cbd 100644
--- a/audio/out/ao_coreaudio_properties.c
+++ b/audio/out/ao_coreaudio_properties.c
@@ -62,7 +62,7 @@ OSStatus ca_get_ary(AudioObjectID id, ca_scope scope, ca_sel selector,
err = AudioObjectGetPropertyDataSize(id, &p_addr, 0, NULL, &p_size);
CHECK_CA_ERROR_SILENT_L(coreaudio_error);
- *data = talloc_size(NULL, p_size);
+ *data = talloc_zero_size(NULL, p_size);
*elements = p_size / element_size;
err = ca_get(id, scope, selector, p_size, *data);
@@ -87,7 +87,7 @@ OSStatus ca_get_str(AudioObjectID id, ca_scope scope, ca_sel selector,
CFStringGetMaximumSizeForEncoding(
CFStringGetLength(string), CA_CFSTR_ENCODING) + 1;
- *data = talloc_size(NULL, size);
+ *data = talloc_zero_size(NULL, size);
CFStringGetCString(string, *data, size, CA_CFSTR_ENCODING);
CFRelease(string);
coreaudio_error: