From b655fd08f71889855efb0443b45014c2787d37b8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 1 Aug 2019 15:06:54 +0200 Subject: [PATCH] stream: destroy proxy on disconnect --- src/pipewire/stream.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 7a1c45376..ffd343885 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1435,16 +1435,13 @@ int pw_stream_disconnect(struct pw_stream *stream) pw_log_debug(NAME" %p: disconnect", stream); impl->disconnecting = true; - if (stream->proxy) { - stream->proxy = NULL; - spa_hook_remove(&stream->proxy_listener); - stream->node_id = SPA_ID_INVALID; - } + if (stream->proxy) + pw_proxy_destroy(stream->proxy); + if (impl->node) { pw_node_destroy(impl->node); impl->node = NULL; } - stream_set_state(stream, PW_STREAM_STATE_UNCONNECTED, NULL); return 0; }