mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	json-pod: return errors from spa_json_next()
Instead of silently ignoring the error and continuing. See #4313
This commit is contained in:
		
							parent
							
								
									ba44236f8f
								
							
						
					
					
						commit
						bf4bb9fcc1
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -54,6 +54,8 @@ static inline int spa_json_to_pod_part(struct spa_pod_builder *b, uint32_t flags
 | 
			
		|||
			if ((res = spa_json_to_pod_part(b, flags, id, pi, &it[0], v, l)) < 0)
 | 
			
		||||
				return res;
 | 
			
		||||
		}
 | 
			
		||||
		if (l < 0)
 | 
			
		||||
			return l;
 | 
			
		||||
		spa_pod_builder_pop(b, &f[0]);
 | 
			
		||||
	}
 | 
			
		||||
	else if (spa_json_is_array(value, len)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -67,6 +69,8 @@ static inline int spa_json_to_pod_part(struct spa_pod_builder *b, uint32_t flags
 | 
			
		|||
		while ((l = spa_json_next(&it[0], &v)) > 0)
 | 
			
		||||
			if ((res = spa_json_to_pod_part(b, flags, id, info, &it[0], v, l)) < 0)
 | 
			
		||||
				return res;
 | 
			
		||||
		if (l < 0)
 | 
			
		||||
			return l;
 | 
			
		||||
		spa_pod_builder_pop(b, &f[0]);
 | 
			
		||||
	}
 | 
			
		||||
	else if (spa_json_is_float(value, len)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue