mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: NULL means default only if id==INVALID
The default values also only apply for sources/sinks which have defaults.
This commit is contained in:
		
							parent
							
								
									7a82be3361
								
							
						
					
					
						commit
						b76bcdc70d
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -3893,8 +3893,14 @@ static int do_get_info(struct client *client, uint32_t command, uint32_t tag, st
 | 
				
			||||||
	if (sel.id != SPA_ID_INVALID && sel.value != NULL)
 | 
						if (sel.id != SPA_ID_INVALID && sel.value != NULL)
 | 
				
			||||||
		goto error_invalid;
 | 
							goto error_invalid;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (sel.value == NULL || (def != NULL && strcmp(sel.value, def)) == 0)
 | 
						if (command == COMMAND_GET_SINK_INFO || command == COMMAND_GET_SOURCE_INFO) {
 | 
				
			||||||
 | 
							if ((sel.value == NULL && sel.id == SPA_ID_INVALID) ||
 | 
				
			||||||
 | 
							    (sel.value != NULL && strcmp(sel.value, def) == 0))
 | 
				
			||||||
			sel.value = get_default(client, command == COMMAND_GET_SINK_INFO);
 | 
								sel.value = get_default(client, command == COMMAND_GET_SINK_INFO);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							if (sel.value == NULL && sel.id == SPA_ID_INVALID)
 | 
				
			||||||
 | 
								goto error_invalid;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_info(NAME" %p: [%s] %s tag:%u idx:%u name:%s", impl, client->name,
 | 
						pw_log_info(NAME" %p: [%s] %s tag:%u idx:%u name:%s", impl, client->name,
 | 
				
			||||||
			commands[command].name, tag, sel.id, sel.value);
 | 
								commands[command].name, tag, sel.id, sel.value);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue