mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	audioconvert: fix scheduling
This commit is contained in:
		
							parent
							
								
									22b8a6f01a
								
							
						
					
					
						commit
						97473c8e8b
					
				
					 2 changed files with 10 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -808,11 +808,16 @@ static int impl_node_process(struct spa_node *node)
 | 
			
		|||
	spa_log_trace(this->log, NAME " %p: process %d", this, this->n_links);
 | 
			
		||||
 | 
			
		||||
	for (i = 1; i < this->n_links; i++) {
 | 
			
		||||
		res = spa_node_process(this->links[i].out_node);
 | 
			
		||||
		if (!SPA_FLAG_CHECK(res, SPA_STATUS_HAVE_BUFFER)) {
 | 
			
		||||
			if (SPA_FLAG_CHECK(res, SPA_STATUS_NEED_BUFFER) && i == 1)
 | 
			
		||||
		int r = spa_node_process(this->links[i].out_node);
 | 
			
		||||
		if (i == 1)
 | 
			
		||||
			res |= r & SPA_STATUS_NEED_BUFFER;
 | 
			
		||||
		if (i == this->n_links - 1)
 | 
			
		||||
			res |= r & SPA_STATUS_HAVE_BUFFER;
 | 
			
		||||
 | 
			
		||||
		if (!SPA_FLAG_CHECK(r, SPA_STATUS_HAVE_BUFFER)) {
 | 
			
		||||
			if (SPA_FLAG_CHECK(r, SPA_STATUS_NEED_BUFFER) && i == 1)
 | 
			
		||||
				break;
 | 
			
		||||
			i = 0;
 | 
			
		||||
			i = res = SPA_STATUS_OK;
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -824,7 +824,7 @@ static int impl_node_process(struct spa_node *node)
 | 
			
		|||
 | 
			
		||||
	inio->status = SPA_STATUS_NEED_BUFFER;
 | 
			
		||||
 | 
			
		||||
	return outio->status;
 | 
			
		||||
	return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const struct spa_node impl_node = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue