mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Revert "jack: use a private writable mapping on input"
This reverts commit 6fefd49a8a.
We can't use PRIVATE because mmap docs say that we then might not see
changes in the data anymore from other processes.
Fixes #3575
			
			
This commit is contained in:
		
							parent
							
								
									886ca8f004
								
							
						
					
					
						commit
						8f2ee0a29c
					
				
					 2 changed files with 5 additions and 9 deletions
				
			
		| 
						 | 
					@ -2575,14 +2575,12 @@ static int client_node_port_use_buffers(void *data,
 | 
				
			||||||
		return -ENOSPC;
 | 
							return -ENOSPC;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (direction == SPA_DIRECTION_INPUT) {
 | 
						if (p->object->port.type_id == TYPE_ID_VIDEO && direction == SPA_DIRECTION_INPUT) {
 | 
				
			||||||
		if (p->object->port.type_id == TYPE_ID_VIDEO) {
 | 
							fl = PW_MEMMAP_FLAG_READ;
 | 
				
			||||||
			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 {
 | 
						} else {
 | 
				
			||||||
 | 
							/* some apps write to the input buffer so we want everything readwrite. We
 | 
				
			||||||
 | 
							 * can't use PRIVATE because then we might not see changes in the buffer
 | 
				
			||||||
 | 
							 * by other apps. */
 | 
				
			||||||
		fl = PW_MEMMAP_FLAG_READWRITE;
 | 
							fl = PW_MEMMAP_FLAG_READWRITE;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -606,8 +606,6 @@ client_node_port_use_buffers(void *_data,
 | 
				
			||||||
	if (n_buffers > MAX_BUFFERS)
 | 
						if (n_buffers > MAX_BUFFERS)
 | 
				
			||||||
		return -ENOSPC;
 | 
							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;
 | 
						prot = PW_MEMMAP_FLAG_READWRITE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* clear previous buffers */
 | 
						/* clear previous buffers */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue