mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	context: keep passive links negotiated
Always make sure passive links are prepared so we can follow them and use them to activate nodes.
This commit is contained in:
		
							parent
							
								
									741a2b3dcc
								
							
						
					
					
						commit
						389b4a72f8
					
				
					 1 changed files with 13 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -798,18 +798,22 @@ static int collect_nodes(struct pw_impl_node *driver)
 | 
			
		|||
	spa_list_init(&queue);
 | 
			
		||||
	spa_list_append(&queue, &driver->sort_link);
 | 
			
		||||
	driver->visited = true;
 | 
			
		||||
	driver->passive = true;
 | 
			
		||||
 | 
			
		||||
	spa_list_consume(n, &queue, sort_link) {
 | 
			
		||||
		spa_list_remove(&n->sort_link);
 | 
			
		||||
		pw_impl_node_set_driver(n, driver);
 | 
			
		||||
		n->passive = true;
 | 
			
		||||
 | 
			
		||||
		spa_list_for_each(p, &n->input_ports, link) {
 | 
			
		||||
			spa_list_for_each(l, &p->links, input_link) {
 | 
			
		||||
				t = l->output->node;
 | 
			
		||||
				if (!l->passive)
 | 
			
		||||
					driver->passive = false;
 | 
			
		||||
				if (l->prepared && !t->visited && t->active) {
 | 
			
		||||
					driver->passive = n->passive = false;
 | 
			
		||||
				else
 | 
			
		||||
					pw_impl_link_prepare(l);
 | 
			
		||||
				if (t->visited || !t->active)
 | 
			
		||||
					continue;
 | 
			
		||||
				if (l->prepared) {
 | 
			
		||||
					t->visited = true;
 | 
			
		||||
					spa_list_append(&queue, &t->sort_link);
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			@ -819,8 +823,12 @@ static int collect_nodes(struct pw_impl_node *driver)
 | 
			
		|||
			spa_list_for_each(l, &p->links, output_link) {
 | 
			
		||||
				t = l->input->node;
 | 
			
		||||
				if (!l->passive)
 | 
			
		||||
					driver->passive = false;
 | 
			
		||||
				if (l->prepared && !t->visited && t->active) {
 | 
			
		||||
					driver->passive = n->passive = false;
 | 
			
		||||
				else
 | 
			
		||||
					pw_impl_link_prepare(l);
 | 
			
		||||
				if (t->visited || !t->active)
 | 
			
		||||
					continue;
 | 
			
		||||
				if (l->prepared) {
 | 
			
		||||
					t->visited = true;
 | 
			
		||||
					spa_list_append(&queue, &t->sort_link);
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue