Commit 8deb4063004a32ffb71206003912e8a301392ead

Frank Praznik 2021-03-28T17:22:59

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c
index 15a8350..81e7946 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);
     }
 }