mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-10-29 05:40:23 -04:00 
			
		
		
		
	combine-sink: fix segfault
This commit is contained in:
		
							parent
							
								
									7e53f902cc
								
							
						
					
					
						commit
						6b82c6122b
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -216,11 +216,13 @@ static void adjust_rates(struct userdata *u) { | |||
| 
 | ||||
|     PA_IDXSET_FOREACH(o, u->outputs, idx) { | ||||
|         uint32_t new_rate = base_rate; | ||||
|         uint32_t current_rate = o->sink_input->sample_spec.rate; | ||||
|         uint32_t current_rate; | ||||
| 
 | ||||
|         if (!o->sink_input || !PA_SINK_IS_OPENED(pa_sink_get_state(o->sink))) | ||||
|             continue; | ||||
| 
 | ||||
|         current_rate = o->sink_input->sample_spec.rate; | ||||
| 
 | ||||
|         if (o->total_latency != target_latency) | ||||
|             new_rate += (uint32_t) (((double) o->total_latency - (double) target_latency) / (double) u->adjust_time * (double) new_rate); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Daniel Albers
						Daniel Albers