ao_pipewire: explicitly remove stream hook

We want to add more logic to the stream event handler.
This logic should not be triggered during normal stream shutdown, so we
remove the listener beforehand.
This commit is contained in:
Thomas Weißschuh 2022-10-28 03:21:23 +02:00 committed by Philip Langdale
parent bf7ade420d
commit b7cf35c9a4
1 changed files with 2 additions and 0 deletions

View File

@ -280,6 +280,8 @@ static void uninit(struct ao *ao)
struct priv *p = ao->priv;
if (p->loop)
pw_thread_loop_stop(p->loop);
spa_hook_remove(&p->stream_listener);
spa_zero(p->stream_listener);
if (p->stream)
pw_stream_destroy(p->stream);
p->stream = NULL;