summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2022-10-28 03:21:23 +0200
committerPhilip Langdale <github.philipl@overt.org>2022-11-07 10:36:40 -0800
commitb7cf35c9a4d5068d3f14af30c38ab8496ad02a39 (patch)
treedb269cd85acd49236d352a93d97771bbe7bb5965 /audio/out
parentbf7ade420d3e77a24c029cc88430362dc949c07f (diff)
downloadmpv-b7cf35c9a4d5068d3f14af30c38ab8496ad02a39.tar.bz2
mpv-b7cf35c9a4d5068d3f14af30c38ab8496ad02a39.tar.xz
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.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_pipewire.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c
index ac48966451..0bb0bed937 100644
--- a/audio/out/ao_pipewire.c
+++ b/audio/out/ao_pipewire.c
@@ -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;