jack: use a private writable mapping on input

See #3571
This commit is contained in:
Wim Taymans 2023-10-14 12:23:39 +02:00
parent c94d5d9d34
commit 6fefd49a8a
2 changed files with 9 additions and 3 deletions

View file

@ -2575,10 +2575,14 @@ static int client_node_port_use_buffers(void *data,
return -ENOSPC;
}
if (p->object->port.type_id == TYPE_ID_VIDEO && direction == SPA_DIRECTION_INPUT) {
fl = PW_MEMMAP_FLAG_READ;
if (direction == SPA_DIRECTION_INPUT) {
if (p->object->port.type_id == TYPE_ID_VIDEO) {
fl = PW_MEMMAP_FLAG_READ;
} else {
/* some apps write to the input buffer so we want everything readwrite */
fl = PW_MEMMAP_FLAG_READWRITE | PW_MEMMAP_FLAG_PRIVATE;
}
} else {
/* some apps write to the input buffer so we want everything readwrite */
fl = PW_MEMMAP_FLAG_READWRITE;
}