client-node: don't destroy the resource from its event

Do no destroy the resource from within the event handler
This commit is contained in:
Wim Taymans 2019-05-22 10:05:24 +02:00
parent b700d76ff4
commit 92808809ec
2 changed files with 1 additions and 7 deletions

View file

@ -1047,12 +1047,6 @@ static void client_node_event(void *data, struct spa_event *event)
this->callbacks->event(this->callbacks_data, event); this->callbacks->event(this->callbacks_data, event);
} }
static void client_node_destroy(void *data)
{
struct impl *impl = data;
pw_client_node_destroy(&impl->this);
}
static struct pw_client_node_proxy_methods client_node_methods = { static struct pw_client_node_proxy_methods client_node_methods = {
PW_VERSION_CLIENT_NODE_PROXY_METHODS, PW_VERSION_CLIENT_NODE_PROXY_METHODS,
.done = client_node_done, .done = client_node_done,
@ -1060,7 +1054,6 @@ static struct pw_client_node_proxy_methods client_node_methods = {
.port_update = client_node_port_update, .port_update = client_node_port_update,
.set_active = client_node_set_active, .set_active = client_node_set_active,
.event = client_node_event, .event = client_node_event,
.destroy = client_node_destroy,
}; };
static void node_on_data_fd_events(struct spa_source *source) static void node_on_data_fd_events(struct spa_source *source)

View file

@ -832,6 +832,7 @@ static int client_node_demarshal_destroy(void *object, void *data, size_t size)
return -EINVAL; return -EINVAL;
pw_resource_do(resource, struct pw_client_node_proxy_methods, destroy, 0); pw_resource_do(resource, struct pw_client_node_proxy_methods, destroy, 0);
pw_resource_destroy(resource);
return 0; return 0;
} }