mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	loop: fix update_timer handling of solo repeat argument
I believe the intent here is that if a `interval` is provided but `value` is unset, then `value` should default to `period` so the timer first fires after one `interval`. Since `interval` is always a relative duration, `value` should be interpreted as a relative duration, not an absolute one.
This commit is contained in:
		
							parent
							
								
									8dfae10746
								
							
						
					
					
						commit
						51b3778f7c
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -884,8 +884,9 @@ loop_update_timer(void *object, struct spa_source *source,
 | 
			
		|||
	if (SPA_LIKELY(value)) {
 | 
			
		||||
		its.it_value = *value;
 | 
			
		||||
	} else if (interval) {
 | 
			
		||||
		// timer initially fires after one interval
 | 
			
		||||
		its.it_value = *interval;
 | 
			
		||||
		absolute = true;
 | 
			
		||||
		absolute = false;
 | 
			
		||||
	}
 | 
			
		||||
	if (SPA_UNLIKELY(interval))
 | 
			
		||||
		its.it_interval = *interval;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue