mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	treewide: access the position information using helpers
Make sure we don't access out of bounds and that we use the helpers wherever we can to access the position information.
This commit is contained in:
		
							parent
							
								
									8bbca3b8f3
								
							
						
					
					
						commit
						818d1435ce
					
				
					 25 changed files with 155 additions and 114 deletions
				
			
		| 
						 | 
				
			
			@ -1229,7 +1229,7 @@ static int probe_ffado_device(struct impl *impl)
 | 
			
		|||
	}
 | 
			
		||||
	if (impl->source.info.channels != n_channels) {
 | 
			
		||||
		impl->source.info.channels = n_channels;
 | 
			
		||||
		for (i = 0; i < SPA_MIN(impl->source.info.channels, MAX_CHANNELS); i++)
 | 
			
		||||
		for (i = 0; i < SPA_MIN(impl->source.info.channels, SPA_AUDIO_MAX_CHANNELS); i++)
 | 
			
		||||
			impl->source.info.position[i] = SPA_AUDIO_CHANNEL_AUX0 + i;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1255,7 +1255,7 @@ static int probe_ffado_device(struct impl *impl)
 | 
			
		|||
	}
 | 
			
		||||
	if (impl->sink.info.channels != n_channels) {
 | 
			
		||||
		impl->sink.info.channels = n_channels;
 | 
			
		||||
		for (i = 0; i < SPA_MIN(impl->sink.info.channels, MAX_CHANNELS); i++)
 | 
			
		||||
		for (i = 0; i < SPA_MIN(impl->sink.info.channels, SPA_AUDIO_MAX_CHANNELS); i++)
 | 
			
		||||
			impl->sink.info.position[i] = SPA_AUDIO_CHANNEL_AUX0 + i;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue