mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	properties: use json parse_string
So that properties with object values get stripped properly.
This commit is contained in:
		
							parent
							
								
									78e2e2c27b
								
							
						
					
					
						commit
						b61c4a88c4
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -172,10 +172,7 @@ int pw_properties_update_string(struct pw_properties *props, const char *str, si
 | 
				
			||||||
			if (spa_json_is_container(value, len))
 | 
								if (spa_json_is_container(value, len))
 | 
				
			||||||
				len = spa_json_container_len(&it[1], value, len);
 | 
									len = spa_json_container_len(&it[1], value, len);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if ((val = strndup(value, len)) == NULL)
 | 
								if ((val = malloc(len)) != NULL)
 | 
				
			||||||
				return -errno;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			if (spa_json_is_string(value, len))
 | 
					 | 
				
			||||||
				spa_json_parse_string(value, len, val);
 | 
									spa_json_parse_string(value, len, val);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		count += pw_properties_set(&impl->this, key, val);
 | 
							count += pw_properties_set(&impl->this, key, val);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue