From 399267393bb96710cde53c2fc7563f55cc32deb8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 5 May 2015 21:47:04 +0200 Subject: ao_coreaudio_utils: don't require talloc for fourcc_repr() Instead, apply a trick to make the caller allocate enough space on the stack. --- audio/out/ao_coreaudio_utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'audio/out/ao_coreaudio_utils.h') diff --git a/audio/out/ao_coreaudio_utils.h b/audio/out/ao_coreaudio_utils.h index 2e87cb472d..50498a969e 100644 --- a/audio/out/ao_coreaudio_utils.h +++ b/audio/out/ao_coreaudio_utils.h @@ -31,7 +31,9 @@ CFStringRef cfstr_from_cstr(char *str); char *cfstr_get_cstr(CFStringRef cfstr); -char *fourcc_repr(void *talloc_ctx, uint32_t code); +char *fourcc_repr_buf(char *buf, size_t buf_size, uint32_t code); +#define fourcc_repr(code) fourcc_repr_buf((char[40]){0}, 40, code) + bool check_ca_st(struct ao *ao, int level, OSStatus code, const char *message); #define CHECK_CA_ERROR_L(label, message) \ -- cgit v1.2.3