mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
remove hooks from objects
Remove the hooks we installed on objects in the destroy/free event or before calling _destroy. This is not really needed but it is a nice thing to do because it calls the hook removed callbacks.
This commit is contained in:
parent
6317bc4deb
commit
1570e62635
19 changed files with 109 additions and 27 deletions
|
|
@ -79,10 +79,12 @@ static void context_unlink(pa_context *c)
|
|||
PA_STREAM_FAILED : PA_STREAM_TERMINATED);
|
||||
}
|
||||
if (c->registry) {
|
||||
spa_hook_remove(&c->core_listener),
|
||||
pw_proxy_destroy((struct pw_proxy*)c->registry);
|
||||
c->registry = NULL;
|
||||
}
|
||||
if (c->core) {
|
||||
spa_hook_remove(&c->core_listener);
|
||||
pw_core_disconnect(c->core);
|
||||
c->core = NULL;
|
||||
}
|
||||
|
|
@ -1897,10 +1899,12 @@ void pa_context_disconnect(pa_context *c)
|
|||
|
||||
c->disconnect = true;
|
||||
if (c->registry) {
|
||||
spa_hook_remove(&c->registry_listener),
|
||||
pw_proxy_destroy((struct pw_proxy*)c->registry);
|
||||
c->registry = NULL;
|
||||
}
|
||||
if (c->core) {
|
||||
spa_hook_remove(&c->core_listener),
|
||||
pw_core_disconnect(c->core);
|
||||
c->core = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue