diff options
author | wm4 <wm4@nowhere> | 2015-05-05 21:47:04 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-05 21:47:04 +0200 |
commit | 399267393bb96710cde53c2fc7563f55cc32deb8 (patch) | |
tree | 4421a331f0bc685ac29c942a057237048232882a /audio/out/ao_coreaudio_utils.h | |
parent | 7a5f5a8adf5921ed8fcee29d76113d9a7f018974 (diff) | |
download | mpv-399267393bb96710cde53c2fc7563f55cc32deb8.tar.bz2 mpv-399267393bb96710cde53c2fc7563f55cc32deb8.tar.xz |
ao_coreaudio_utils: don't require talloc for fourcc_repr()
Instead, apply a trick to make the caller allocate enough space on the
stack.
Diffstat (limited to 'audio/out/ao_coreaudio_utils.h')
-rw-r--r-- | audio/out/ao_coreaudio_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
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) \ |