mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
client-node: fix mem_offset of io areas
This commit is contained in:
parent
e7bff4293d
commit
1f077c7e0a
1 changed files with 3 additions and 2 deletions
|
|
@ -615,11 +615,12 @@ static int do_port_set_io(struct impl *impl,
|
||||||
if ((mem = pw_memblock_find(data)) == NULL)
|
if ((mem = pw_memblock_find(data)) == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
mem_offset = mem->offset;
|
mem_offset = SPA_PTRDIFF(data, mem->ptr);
|
||||||
mem_size = mem->size;
|
mem_size = mem->size;
|
||||||
if (mem_size - mem_offset < size)
|
if (mem_size - mem_offset < size)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
mem_offset += mem->offset;
|
||||||
m = ensure_mem(impl, mem->fd, t->data.MemFd, mem->flags);
|
m = ensure_mem(impl, mem->fd, t->data.MemFd, mem->flags);
|
||||||
memid = m->id;
|
memid = m->id;
|
||||||
}
|
}
|
||||||
|
|
@ -1312,7 +1313,7 @@ static void node_port_added(void *data, struct pw_port *port)
|
||||||
{
|
{
|
||||||
struct impl *impl = data;
|
struct impl *impl = data;
|
||||||
|
|
||||||
pw_log_debug("client-node %p: port added", &impl->this);
|
pw_log_debug("client-node %p: port %p added", &impl->this, port);
|
||||||
port->mix_node.port_set_io = mix_port_set_io;
|
port->mix_node.port_set_io = mix_port_set_io;
|
||||||
port->mix_node.process_input = mix_port_process_input;
|
port->mix_node.process_input = mix_port_process_input;
|
||||||
port->mix_node.process_output = mix_port_process_output;
|
port->mix_node.process_output = mix_port_process_output;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue