mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: support: loop: reset rmask after dispatch
Reset the `rmask` of the sources to zero after dispatching the callbacks. This way the sources are always as up-to-date as possible.
This commit is contained in:
		
							parent
							
								
									a22ce76dbf
								
							
						
					
					
						commit
						cb8c2d8857
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -367,9 +367,14 @@ static int loop_iterate(void *object, int timeout)
 | 
			
		|||
	}
 | 
			
		||||
	for (i = 0; i < nfds; i++) {
 | 
			
		||||
		struct spa_source *s = ep[i].data;
 | 
			
		||||
		if (SPA_LIKELY(s && s->rmask && s->loop)) {
 | 
			
		||||
			s->priv = NULL;
 | 
			
		||||
		if (SPA_LIKELY(s && s->rmask && s->loop))
 | 
			
		||||
			s->func(s);
 | 
			
		||||
	}
 | 
			
		||||
	for (i = 0; i < nfds; i++) {
 | 
			
		||||
		struct spa_source *s = ep[i].data;
 | 
			
		||||
		if (SPA_LIKELY(s)) {
 | 
			
		||||
			s->rmask = 0;
 | 
			
		||||
			s->priv = NULL;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if (SPA_UNLIKELY(!spa_list_is_empty(&impl->destroy_list)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue