Skip to content

Commit

Permalink
Lock thread loop before destroying stream
Browse files Browse the repository at this point in the history
Better fix for #1305
  • Loading branch information
mawe42 committed Mar 26, 2024
1 parent 50db42a commit 76870f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/drivers/fluid_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p)

if (drv->pw_loop)
{
pw_thread_loop_stop(drv->pw_loop);
pw_thread_loop_lock(drv->pw_loop);
}

if(drv->pw_stream)
Expand All @@ -306,6 +306,7 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p)

if(drv->pw_loop)
{
pw_thread_loop_unlock(drv->pw_loop);
pw_thread_loop_destroy(drv->pw_loop);
}

Expand Down

0 comments on commit 76870f7

Please sign in to comment.