mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
remote-node: avoid map and unmap for our own node
This commit is contained in:
parent
8ed3cfe679
commit
9351b14bf4
2 changed files with 9 additions and 12 deletions
|
|
@ -795,13 +795,19 @@ client_node_set_activation(void *object,
|
|||
struct node_data *data = proxy->user_data;
|
||||
struct pw_node *node = data->node;
|
||||
struct pw_memmap *mm;
|
||||
struct pw_node_activation *ptr;
|
||||
void *ptr;
|
||||
struct link *link;
|
||||
int res = 0;
|
||||
|
||||
if (data->remote_id == node_id) {
|
||||
pw_log_debug("node %p: our activation %u: %u %u %u", node, node_id,
|
||||
memid, offset, size);
|
||||
close(signalfd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (memid == SPA_ID_INVALID) {
|
||||
ptr = NULL;
|
||||
mm = NULL;
|
||||
mm = ptr = NULL;
|
||||
size = 0;
|
||||
}
|
||||
else {
|
||||
|
|
@ -815,14 +821,6 @@ client_node_set_activation(void *object,
|
|||
}
|
||||
pw_log_debug("node %p: set activation %d %p %u %u", node, node_id, ptr, offset, size);
|
||||
|
||||
if (data->remote_id == node_id) {
|
||||
pw_log_debug("node %p: our activation %u: %u %u %u %p", node, node_id,
|
||||
memid, offset, size, ptr);
|
||||
if (mm)
|
||||
pw_memmap_free(mm);
|
||||
close(signalfd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ptr) {
|
||||
link = pw_array_add(&data->links, sizeof(struct link));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue