mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
filter-chain: actually use ladspa_handle_list
Add successfully loaded handles to the list in `ladspa_handle_load()`, and remove them when they are freed in `ladspa_handle_unref()`.
This commit is contained in:
parent
a8a6def20f
commit
67e588f382
1 changed files with 5 additions and 0 deletions
|
|
@ -756,8 +756,11 @@ static void ladspa_handle_unref(struct ladspa_handle *hndl)
|
|||
{
|
||||
if (--hndl->ref > 0)
|
||||
return;
|
||||
|
||||
if (hndl->handle)
|
||||
dlclose(hndl->handle);
|
||||
|
||||
spa_list_remove(&hndl->link);
|
||||
free(hndl);
|
||||
}
|
||||
|
||||
|
|
@ -806,7 +809,9 @@ static struct ladspa_handle *ladspa_handle_load(struct impl *impl, const char *p
|
|||
res = -ENOSYS;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
spa_list_init(&hndl->descriptor_list);
|
||||
spa_list_append(&impl->ladspa_handle_list, &hndl->link);
|
||||
|
||||
return hndl;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue