Skip to content

Commit

Permalink
Fix launch app when pipewire service is stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
viachaslavic committed Jan 7, 2025
1 parent 839b765 commit 73b5476
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions audio/common/pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,17 @@ bool pipewire_core_init(pipewire_core_t *pw, const char *loop_name)
pw_thread_loop_lock(pw->thread_loop);

pw->core = pw_context_connect(pw->ctx, NULL, 0);
if(!pw->core)
return false;
if (!pw->core)
goto unlock;

if (pw_core_add_listener(pw->core,
&pw->core_listener,
&core_events, pw) < 0)
return false;
goto unlock;

return true;

unlock:
pw_thread_loop_unlock(pw->thread_loop);
return false;
}

0 comments on commit 73b5476

Please sign in to comment.