mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-spa: remove the listeners correctly
In the module destroy, remove the module listener and in the factory_destroy, the factory_listener.
This commit is contained in:
parent
42319e32be
commit
6317bc4deb
1 changed files with 5 additions and 3 deletions
|
|
@ -192,10 +192,10 @@ static void factory_destroy(void *_data)
|
|||
struct factory_data *data = _data;
|
||||
struct node_data *nd;
|
||||
|
||||
spa_hook_remove(&data->module_listener);
|
||||
|
||||
spa_hook_remove(&data->factory_listener);
|
||||
spa_list_consume(nd, &data->node_list, link)
|
||||
pw_impl_node_destroy(nd->node);
|
||||
data->this = NULL;
|
||||
}
|
||||
|
||||
static const struct pw_impl_factory_events factory_events = {
|
||||
|
|
@ -206,7 +206,9 @@ static const struct pw_impl_factory_events factory_events = {
|
|||
static void module_destroy(void *_data)
|
||||
{
|
||||
struct factory_data *data = _data;
|
||||
pw_impl_factory_destroy(data->this);
|
||||
spa_hook_remove(&data->module_listener);
|
||||
if (data->this)
|
||||
pw_impl_factory_destroy(data->this);
|
||||
}
|
||||
|
||||
static void module_registered(void *data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue