mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-06 09:28:18 +02:00
softdsp-endpoint: improve destruction sequence
- Set the node proxy to NULL when it is destroyed externally so that we don't try to destroy it a second time in finalize. - Don't remove the dsp_listener, as this is already done inside the node proxy destroy sequence (but keep removing the node listener to avoid calling node_proxy_destroy() from inside finalize())
This commit is contained in:
parent
c9f03b2cad
commit
acc3eef294
1 changed files with 2 additions and 3 deletions
|
|
@ -224,6 +224,7 @@ node_proxy_destroy(void *data)
|
|||
{
|
||||
WpPwAudioSoftdspEndpoint *self = data;
|
||||
|
||||
self->node_proxy = NULL;
|
||||
wp_endpoint_unregister (WP_ENDPOINT (self));
|
||||
}
|
||||
|
||||
|
|
@ -281,10 +282,8 @@ endpoint_finalize (GObject * object)
|
|||
}
|
||||
|
||||
/* Remove and destroy the dsp_proxy */
|
||||
if (self->dsp_proxy) {
|
||||
spa_hook_remove (&self->dsp_listener);
|
||||
if (self->dsp_proxy)
|
||||
pw_proxy_destroy ((struct pw_proxy *) self->dsp_proxy);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (endpoint_parent_class)->finalize (object);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue