mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	media-session: improve conf parsing
Just use parse_string to convert the value.
This commit is contained in:
		
							parent
							
								
									85cb85d440
								
							
						
					
					
						commit
						f29bc42b4d
					
				
					 2 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -217,10 +217,10 @@ static bool find_match(struct spa_json *arr, struct pw_properties *props)
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			str = pw_properties_get(props, key);
 | 
								str = pw_properties_get(props, key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (spa_json_is_null(value, len)) {
 | 
								if (spa_json_is_null(value, len)) {
 | 
				
			||||||
				success = str == NULL;
 | 
									success = str == NULL;
 | 
				
			||||||
			}
 | 
								} else {
 | 
				
			||||||
			else if (spa_json_is_string(value, len)) {
 | 
					 | 
				
			||||||
				spa_json_parse_string(value, SPA_MIN(len, 1024), val);
 | 
									spa_json_parse_string(value, SPA_MIN(len, 1024), val);
 | 
				
			||||||
				value = val;
 | 
									value = val;
 | 
				
			||||||
				len = strlen(val);
 | 
									len = strlen(val);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2176,7 +2176,6 @@ again:
 | 
				
			||||||
	while (spa_json_get_string(&it[1], key, sizeof(key)-1) > 0) {
 | 
						while (spa_json_get_string(&it[1], key, sizeof(key)-1) > 0) {
 | 
				
			||||||
		bool add = false;
 | 
							bool add = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pw_log_info("%s", key);
 | 
					 | 
				
			||||||
		if (key[0] == '#') {
 | 
							if (key[0] == '#') {
 | 
				
			||||||
			add = false;
 | 
								add = false;
 | 
				
			||||||
		} else if (pw_properties_get(impl->modules, key) != NULL) {
 | 
							} else if (pw_properties_get(impl->modules, key) != NULL) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue