mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	jack: improve _is_mine() check
Also check the client, in case someone uses a port from another client.
This commit is contained in:
		
							parent
							
								
									3dde9fef9c
								
							
						
					
					
						commit
						a559b96d61
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -4219,7 +4219,9 @@ int jack_port_is_mine (const jack_client_t *client, const jack_port_t *port)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct object *o = (struct object *) port;
 | 
						struct object *o = (struct object *) port;
 | 
				
			||||||
	spa_return_val_if_fail(o != NULL, 0);
 | 
						spa_return_val_if_fail(o != NULL, 0);
 | 
				
			||||||
	return o->type == INTERFACE_Port && o->port.port_id != SPA_ID_INVALID;
 | 
						return o->type == INTERFACE_Port &&
 | 
				
			||||||
 | 
							o->port.port != NULL &&
 | 
				
			||||||
 | 
							o->port.port->client == (struct client*)client;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SPA_EXPORT
 | 
					SPA_EXPORT
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue