mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	client-node: only pull once
When we pull, don't pull again until we get the reply or else we might overwrite the result in progress.
This commit is contained in:
		
							parent
							
								
									7f5c6ddd46
								
							
						
					
					
						commit
						5b4a4922db
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -128,6 +128,7 @@ struct impl {
 | 
			
		|||
	int other_fds[2];
 | 
			
		||||
 | 
			
		||||
	bool client_reuse;
 | 
			
		||||
	bool out_pending;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/** \endcond */
 | 
			
		||||
| 
						 | 
				
			
			@ -785,6 +786,11 @@ static int spa_proxy_node_process_output(struct spa_node *node)
 | 
			
		|||
	this = SPA_CONTAINER_OF(node, struct proxy, node);
 | 
			
		||||
	impl = this->impl;
 | 
			
		||||
 | 
			
		||||
	if (impl->out_pending)
 | 
			
		||||
		return res;
 | 
			
		||||
 | 
			
		||||
	impl->out_pending = true;
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < MAX_OUTPUTS; i++) {
 | 
			
		||||
		struct spa_port_io *io = this->out_ports[i].io;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -818,6 +824,7 @@ static int handle_node_message(struct proxy *this, struct pw_client_node_message
 | 
			
		|||
 | 
			
		||||
			*io = impl->transport->outputs[i];
 | 
			
		||||
			pw_log_trace("%d %d", io->status, io->buffer_id);
 | 
			
		||||
			impl->out_pending = false;
 | 
			
		||||
		}
 | 
			
		||||
		this->callbacks->have_output(this->callbacks_data);
 | 
			
		||||
	} else if (PW_CLIENT_NODE_MESSAGE_TYPE(message) == PW_CLIENT_NODE_MESSAGE_NEED_INPUT) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue