From 8deb4063004a32ffb71206003912e8a301392ead Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Sun, 28 Mar 2021 17:22:59 -0400 Subject: [PATCH] audio: pipewire: Avoid redundant locking The pw_thread_loop already locks and unlocks the thread mutex at the start and end of each loop iteration, so these locks are unnecessary. --- src/audio/pipewire/SDL_pipewire.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c index 15a8350ef..81e7946d0 100644 --- a/src/audio/pipewire/SDL_pipewire.c +++ b/src/audio/pipewire/SDL_pipewire.c @@ -418,16 +418,12 @@ static void core_events_hotplug_init_callback(void *object, uint32_t id, int seq) { if (id == PW_ID_CORE && seq == hotplug_init_seq_val) { - PIPEWIRE_pw_thread_loop_lock(hotplug_loop); - /* This core listener is no longer needed. */ spa_hook_remove(&hotplug_core_listener); /* Signal that the initial I/O list is populated */ SDL_AtomicSet(&hotplug_init_complete, 1); PIPEWIRE_pw_thread_loop_signal(hotplug_loop, false); - - PIPEWIRE_pw_thread_loop_unlock(hotplug_loop); } }