mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	libcemara: take care of index offset when enumerating controls
Add an index offset when enumerating controls. We insert 2 properties before enumerating the controls so the index of the first control needs to have an offset of 2.
This commit is contained in:
		
							parent
							
								
									a66377cf42
								
							
						
					
					
						commit
						9207fea992
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -495,7 +495,7 @@ static uint32_t prop_id_to_control(struct impl *impl, uint32_t prop_id)
 | 
			
		|||
 | 
			
		||||
static int
 | 
			
		||||
spa_libcamera_enum_controls(struct impl *impl, struct port *port, int seq,
 | 
			
		||||
		       uint32_t start, uint32_t num,
 | 
			
		||||
		       uint32_t start, uint32_t offset, uint32_t num,
 | 
			
		||||
		       const struct spa_pod *filter)
 | 
			
		||||
{
 | 
			
		||||
	const ControlInfoMap &info = impl->camera->controls();
 | 
			
		||||
| 
						 | 
				
			
			@ -513,7 +513,7 @@ spa_libcamera_enum_controls(struct impl *impl, struct port *port, int seq,
 | 
			
		|||
	result.next = start;
 | 
			
		||||
 | 
			
		||||
	auto it = info.begin();
 | 
			
		||||
	for (skip = result.next; skip; skip--)
 | 
			
		||||
	for (skip = result.next - offset; skip; skip--)
 | 
			
		||||
		it++;
 | 
			
		||||
 | 
			
		||||
	if (false) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue