Skip to content

Commit

Permalink
pipewire: avoid crashing when server is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
sthibaul committed Oct 28, 2024
1 parent 7a04f7f commit 027e4fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/audio/pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ static AudioID *pipewire_open(void **pars)
state->sample_buffer = malloc(SAMPLE_BUFFER_SIZE);
// initialise the event file descripter and the stream
state->stream = pw_stream_new_simple(state->inner_loop, pars[1], pw_properties_new(PW_KEY_MEDIA_TYPE, "Audio", PW_KEY_MEDIA_CATEGORY, "Playback", PW_KEY_MEDIA_ROLE, "Accessibility", NULL), &stream_events, state);
if (!state->stream)
return NULL;
if ((state->eventfd_number = spa_system_eventfd_create(state->inner_loop->system, SPA_FD_CLOEXEC)) < 0)
{
error("can not create event file descriptor");
Expand Down

0 comments on commit 027e4fc

Please sign in to comment.