client-stream: first destroy the node

When the client-stream is destroyed, let us first destroy the node
of the stream and then the internal client-node.
This commit is contained in:
Wim Taymans 2019-03-08 11:55:01 +01:00
parent 7cdc13b281
commit 3e359646d7

View file

@ -1173,13 +1173,13 @@ static void node_destroy(void *data)
struct impl *impl = data; struct impl *impl = data;
pw_log_debug("client-stream %p: destroy", &impl->this); pw_log_debug("client-stream %p: destroy", &impl->this);
spa_hook_remove(&impl->client_node_listener); spa_hook_remove(&impl->client_node_listener);
pw_client_node_destroy(impl->client_node);
} }
static void node_free(void *data) static void node_free(void *data)
{ {
struct impl *impl = data; struct impl *impl = data;
pw_log_debug("client-stream %p: free", &impl->this); pw_log_debug("client-stream %p: free", &impl->this);
pw_client_node_destroy(impl->client_node);
spa_hook_remove(&impl->node_listener); spa_hook_remove(&impl->node_listener);
cleanup(impl); cleanup(impl);
} }