mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: fix max_position check
This commit is contained in:
		
							parent
							
								
									7706ca6361
								
							
						
					
					
						commit
						056f257058
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -314,4 +314,4 @@ static const struct spa_type_info spa_type_audio_volume_ramp_scale[] = {
 | 
				
			||||||
}  /* extern "C" */
 | 
					}  /* extern "C" */
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* SPA_AUDIO_RAW_RAW_TYPES_H */
 | 
					#endif /* SPA_AUDIO_RAW_TYPES_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,7 +89,7 @@ spa_format_audio_raw_ext_build(struct spa_pod_builder *builder, uint32_t id,
 | 
				
			||||||
		/* we drop the positions here when we can't read all of them. This is
 | 
							/* we drop the positions here when we can't read all of them. This is
 | 
				
			||||||
		 * really a malformed spa_audio_info structure. */
 | 
							 * really a malformed spa_audio_info structure. */
 | 
				
			||||||
		if (!SPA_FLAG_IS_SET(info->flags, SPA_AUDIO_FLAG_UNPOSITIONED) &&
 | 
							if (!SPA_FLAG_IS_SET(info->flags, SPA_AUDIO_FLAG_UNPOSITIONED) &&
 | 
				
			||||||
		    max_position > info->channels) {
 | 
							    info->channels <= max_position) {
 | 
				
			||||||
			spa_pod_builder_add(builder, SPA_FORMAT_AUDIO_position,
 | 
								spa_pod_builder_add(builder, SPA_FORMAT_AUDIO_position,
 | 
				
			||||||
				SPA_POD_Array(sizeof(uint32_t), SPA_TYPE_Id,
 | 
									SPA_POD_Array(sizeof(uint32_t), SPA_TYPE_Id,
 | 
				
			||||||
					info->channels, info->position), 0);
 | 
										info->channels, info->position), 0);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue