mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: find the sink when doing monitor source lookup
When we do a lookup of a source with the monitor flag bits set in the id, strip off the monitor bits se we can find the associated sink. Fixes #1677
This commit is contained in:
		
							parent
							
								
									38981a4c8c
								
							
						
					
					
						commit
						9afb832d22
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -3996,9 +3996,11 @@ static int do_get_info(struct client *client, uint32_t command, uint32_t tag, st
 | 
			
		|||
			goto error_invalid;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (command == COMMAND_GET_SOURCE_INFO &&
 | 
			
		||||
	    sel.value != NULL && spa_strendswith(sel.value, ".monitor")) {
 | 
			
		||||
		sel.value = strndupa(sel.value, strlen(sel.value)-8);
 | 
			
		||||
	if (command == COMMAND_GET_SOURCE_INFO) {
 | 
			
		||||
		if (sel.value != NULL && spa_strendswith(sel.value, ".monitor"))
 | 
			
		||||
			sel.value = strndupa(sel.value, strlen(sel.value)-8);
 | 
			
		||||
		if (sel.id & MONITOR_FLAG)
 | 
			
		||||
			sel.id &= INDEX_MASK;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	o = select_object(manager, &sel);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue