diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-01-31 00:31:25 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-29 02:35:10 +0000 |
commit | db59a1c1a76f9a4c5390b47d715aabd7dfd2e83e (patch) | |
tree | 3c888af3b91b9d57996e9e54e83b37770cbca176 /audio/chmap.h | |
parent | f9234d890aab3bf0f959b79ec2b7843b6c9610d8 (diff) | |
download | mpv-db59a1c1a76f9a4c5390b47d715aabd7dfd2e83e.tar.bz2 mpv-db59a1c1a76f9a4c5390b47d715aabd7dfd2e83e.tar.xz |
audio/chmap: link string buffer size to MP_NUM_CHANNELS
Diffstat (limited to 'audio/chmap.h')
-rw-r--r-- | audio/chmap.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/chmap.h b/audio/chmap.h index 6fbb60d025..35f569d9cc 100644 --- a/audio/chmap.h +++ b/audio/chmap.h @@ -124,10 +124,12 @@ void mp_chmap_get_reorder(int src[MP_NUM_CHANNELS], const struct mp_chmap *from, int mp_chmap_diffn(const struct mp_chmap *a, const struct mp_chmap *b); char *mp_chmap_to_str_buf(char *buf, size_t buf_size, const struct mp_chmap *src); -#define mp_chmap_to_str(m) mp_chmap_to_str_buf((char[64]){0}, 64, (m)) +#define mp_chmap_to_str_(m, sz) mp_chmap_to_str_buf((char[sz]){0}, sz, (m)) +#define mp_chmap_to_str(m) mp_chmap_to_str_(m, MP_NUM_CHANNELS * 4) char *mp_chmap_to_str_hr_buf(char *buf, size_t buf_size, const struct mp_chmap *src); -#define mp_chmap_to_str_hr(m) mp_chmap_to_str_hr_buf((char[128]){0}, 128, (m)) +#define mp_chmap_to_str_hr_(m, sz) mp_chmap_to_str_hr_buf((char[sz]){0}, sz, (m)) +#define mp_chmap_to_str_hr(m) mp_chmap_to_str_hr_(m, MP_NUM_CHANNELS * 4) bool mp_chmap_from_str(struct mp_chmap *dst, bstr src); |