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) {
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 {
fl = PW_MEMMAP_FLAG_READWRITE;
}

View file

@ -606,6 +606,8 @@ client_node_port_use_buffers(void *_data,
if (n_buffers > MAX_BUFFERS)
return -ENOSPC;
/* this is for the metadata, which needs to be writable for input buffers
* as well, for the busy metadata, for example */
prot = PW_MEMMAP_FLAG_READWRITE;
/* clear previous buffers */