mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa-device: cleanup in the free signal
Cleanup and close the plugin in the free signal so that the object has a chance to remove the event handlers from the object.
This commit is contained in:
parent
a0b2e5b498
commit
29d6179328
2 changed files with 4 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ struct impl {
|
|||
void *user_data;
|
||||
};
|
||||
|
||||
static void device_destroy(void *data)
|
||||
static void device_free(void *data)
|
||||
{
|
||||
struct impl *impl = data;
|
||||
struct pw_impl_device *device = impl->this;
|
||||
|
|
@ -64,7 +64,7 @@ static void device_destroy(void *data)
|
|||
|
||||
static const struct pw_impl_device_events device_events = {
|
||||
PW_VERSION_IMPL_DEVICE_EVENTS,
|
||||
.destroy = device_destroy,
|
||||
.free = device_free,
|
||||
};
|
||||
|
||||
struct pw_impl_device *
|
||||
|
|
|
|||
|
|
@ -190,9 +190,9 @@ void pw_impl_device_destroy(struct pw_impl_device *device)
|
|||
if (device->registered)
|
||||
spa_list_remove(&device->link);
|
||||
|
||||
if (device->device) {
|
||||
if (device->device)
|
||||
spa_hook_remove(&device->listener);
|
||||
}
|
||||
|
||||
if (device->global) {
|
||||
spa_hook_remove(&device->global_listener);
|
||||
pw_global_destroy(device->global);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue