[vlc-commits] aout/coreaudio: Use symbols directly instead of dlsym

Marvin Scholz git at videolan.org
Fri Aug 2 14:37:19 CEST 2019


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Aug  2 13:59:13 2019 +0200| [58036e27b2152d8219fcfe173bc0f20a00df0dd0] | committer: Marvin Scholz

aout/coreaudio: Use symbols directly instead of dlsym

It is not needed to load the symbols using dlsym here, they will be
automatically available if the OS version is recent enough or NULL if
not.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58036e27b2152d8219fcfe173bc0f20a00df0dd0
---

 modules/audio_output/coreaudio_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/coreaudio_common.c b/modules/audio_output/coreaudio_common.c
index 3a9ec69113..836a5f6de4 100644
--- a/modules/audio_output/coreaudio_common.c
+++ b/modules/audio_output/coreaudio_common.c
@@ -63,10 +63,10 @@ ca_ClearOutBuffers(audio_output_t *p_aout)
 static void
 ca_init_once(void)
 {
-    unfair_lock.lock = dlsym(RTLD_DEFAULT, "os_unfair_lock_lock");
+    unfair_lock.lock = os_unfair_lock_lock;
     if (!unfair_lock.lock)
         return;
-    unfair_lock.unlock = dlsym(RTLD_DEFAULT, "os_unfair_lock_unlock");
+    unfair_lock.unlock = os_unfair_lock_unlock;
     if (!unfair_lock.unlock)
         unfair_lock.lock = NULL;
 



More information about the vlc-commits mailing list