mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
client-node: clean up buffers and other memory
This commit is contained in:
parent
c879b85884
commit
d86e462dca
2 changed files with 6 additions and 0 deletions
|
|
@ -1329,6 +1329,7 @@ static int port_release_mix(void *data, struct pw_port_mix *mix)
|
||||||
if ((m = find_mix(port, mix->port.port_id)) == NULL || !m->valid)
|
if ((m = find_mix(port, mix->port.port_id)) == NULL || !m->valid)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
clear_buffers(this, m);
|
||||||
pw_map_remove(&impl->io_map, mix->id);
|
pw_map_remove(&impl->io_map, mix->id);
|
||||||
m->valid = false;
|
m->valid = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,8 @@ static void clear_link(struct node_data *data, struct link *link)
|
||||||
static void clean_transport(struct node_data *data)
|
static void clean_transport(struct node_data *data)
|
||||||
{
|
{
|
||||||
struct link *l;
|
struct link *l;
|
||||||
|
uint32_t tag[5] = { data->remote_id, };
|
||||||
|
struct pw_memmap *mm;
|
||||||
|
|
||||||
if (!data->have_transport)
|
if (!data->have_transport)
|
||||||
return;
|
return;
|
||||||
|
|
@ -131,6 +133,9 @@ static void clean_transport(struct node_data *data)
|
||||||
}
|
}
|
||||||
pw_array_clear(&data->links);
|
pw_array_clear(&data->links);
|
||||||
|
|
||||||
|
while ((mm = pw_mempool_find_tag(data->remote->pool, tag, sizeof(uint32_t))) != NULL)
|
||||||
|
pw_memmap_free(mm);
|
||||||
|
|
||||||
pw_memmap_free(data->activation);
|
pw_memmap_free(data->activation);
|
||||||
close(data->rtwritefd);
|
close(data->rtwritefd);
|
||||||
data->remote_id = SPA_ID_INVALID;
|
data->remote_id = SPA_ID_INVALID;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue