mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-21 06:46:38 -04:00
audioadapter: remap port id for port_reuse_buffer on target
port_use_buffers and related port methods increment port_id when the implicit output direction differs from the adapter's primary direction. port_reuse_buffer only receives a port id but applies to output ports, so apply the same offset before forwarding to this->target. Also update videoadapter for the same mapping.
This commit is contained in:
parent
c3d16a39f5
commit
2722d16303
2 changed files with 6 additions and 0 deletions
|
|
@ -1812,6 +1812,9 @@ impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
|
||||||
|
|
||||||
spa_return_val_if_fail(this != NULL, -EINVAL);
|
spa_return_val_if_fail(this != NULL, -EINVAL);
|
||||||
|
|
||||||
|
if (SPA_DIRECTION_OUTPUT != this->direction)
|
||||||
|
port_id++;
|
||||||
|
|
||||||
return spa_node_port_reuse_buffer(this->target, port_id, buffer_id);
|
return spa_node_port_reuse_buffer(this->target, port_id, buffer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1779,6 +1779,9 @@ impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
|
||||||
|
|
||||||
spa_return_val_if_fail(this != NULL, -EINVAL);
|
spa_return_val_if_fail(this != NULL, -EINVAL);
|
||||||
|
|
||||||
|
if (SPA_DIRECTION_OUTPUT != this->direction)
|
||||||
|
port_id++;
|
||||||
|
|
||||||
return spa_node_port_reuse_buffer(this->target, port_id, buffer_id);
|
return spa_node_port_reuse_buffer(this->target, port_id, buffer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue