diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-10-22 07:18:08 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-26 20:06:14 +0000 |
commit | f659a60dfa07664ba9a754619dbac13f5f0c7000 (patch) | |
tree | 58bfd298eaafb3d051e9814090db7e2f789bb064 /audio/out | |
parent | 7a58763ad96aba8dc3f64a92615927242221b634 (diff) | |
download | mpv-f659a60dfa07664ba9a754619dbac13f5f0c7000.tar.bz2 mpv-f659a60dfa07664ba9a754619dbac13f5f0c7000.tar.xz |
semaphore_osx: don't overwrite global symbols
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_coreaudio_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/out/ao_coreaudio_utils.c b/audio/out/ao_coreaudio_utils.c index 67ab98d34d..f2ab6f6315 100644 --- a/audio/out/ao_coreaudio_utils.c +++ b/audio/out/ao_coreaudio_utils.c @@ -457,8 +457,8 @@ static OSStatus ca_change_format_listener( const AudioObjectPropertyAddress addresses[], void *data) { - sem_t *sem = data; - sem_post(sem); + mp_sem_t *sem = data; + mp_sem_post(sem); return noErr; } @@ -471,7 +471,7 @@ bool ca_change_physical_format_sync(struct ao *ao, AudioStreamID stream, ca_print_asbd(ao, "setting stream physical format:", &change_format); sem_t wakeup; - if (sem_init(&wakeup, 0, 0)) { + if (mp_sem_init(&wakeup, 0, 0)) { MP_WARN(ao, "OOM\n"); return false; } @@ -511,7 +511,7 @@ bool ca_change_physical_format_sync(struct ao *ao, AudioStreamID stream, if (format_set) break; - if (sem_timedwait(&wakeup, &timeout)) { + if (mp_sem_timedwait(&wakeup, &timeout)) { MP_VERBOSE(ao, "reached timeout\n"); break; } @@ -533,7 +533,7 @@ bool ca_change_physical_format_sync(struct ao *ao, AudioStreamID stream, CHECK_CA_ERROR("can't remove property listener"); coreaudio_error: - sem_destroy(&wakeup); + mp_sem_destroy(&wakeup); return format_set; } #endif |