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:
Barnabás Pőcze 2021-05-23 20:43:31 +02:00 committed by Wim Taymans
parent a8a6def20f
commit 67e588f382

View file

@ -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;