mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	filter-chain: iterate the port correctly
Don't use the number of handles to iterate the output ports but the number of output ports on the node. Fixes #2737
This commit is contained in:
		
							parent
							
								
									94a857550b
								
							
						
					
					
						commit
						94a6426861
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -1561,6 +1561,10 @@ static int load_node(struct graph *graph, struct spa_json *json)
 | 
				
			||||||
	node->control_port = calloc(desc->n_control, sizeof(struct port));
 | 
						node->control_port = calloc(desc->n_control, sizeof(struct port));
 | 
				
			||||||
	node->notify_port = calloc(desc->n_notify, sizeof(struct port));
 | 
						node->notify_port = calloc(desc->n_notify, sizeof(struct port));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pw_log_info("loaded n_input:%d n_output:%d n_control:%d n_notify:%d",
 | 
				
			||||||
 | 
								desc->n_input, desc->n_output,
 | 
				
			||||||
 | 
								desc->n_control, desc->n_notify);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < desc->n_input; i++) {
 | 
						for (i = 0; i < desc->n_input; i++) {
 | 
				
			||||||
		struct port *port = &node->input_port[i];
 | 
							struct port *port = &node->input_port[i];
 | 
				
			||||||
		port->node = node;
 | 
							port->node = node;
 | 
				
			||||||
| 
						 | 
					@ -1953,6 +1957,8 @@ static int setup_graph(struct graph *graph, struct spa_json *inputs, struct spa_
 | 
				
			||||||
			gh->hndl = &node->hndl[i];
 | 
								gh->hndl = &node->hndl[i];
 | 
				
			||||||
			gh->desc = d;
 | 
								gh->desc = d;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for (i = 0; i < desc->n_output; i++) {
 | 
				
			||||||
			spa_list_for_each(link, &node->output_port[i].link_list, output_link)
 | 
								spa_list_for_each(link, &node->output_port[i].link_list, output_link)
 | 
				
			||||||
				link->input->node->n_deps--;
 | 
									link->input->node->n_deps--;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue