mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	link: fix negotiation
Don't use the current best format as a filter to get the current format. It might be different and then we fail.
This commit is contained in:
		
							parent
							
								
									d91e545e1d
								
							
						
					
					
						commit
						e079552dc8
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -213,7 +213,7 @@ static int do_negotiate(struct pw_link *this, uint32_t in_state, uint32_t out_st
 | 
				
			||||||
		if ((res = spa_node_port_enum_params(output->node->node,
 | 
							if ((res = spa_node_port_enum_params(output->node->node,
 | 
				
			||||||
						     output->direction, output->port_id,
 | 
											     output->direction, output->port_id,
 | 
				
			||||||
						     SPA_PARAM_Format, &index,
 | 
											     SPA_PARAM_Format, &index,
 | 
				
			||||||
						     format, ¤t, &b)) <= 0) {
 | 
											     NULL, ¤t, &b)) <= 0) {
 | 
				
			||||||
			if (res == 0)
 | 
								if (res == 0)
 | 
				
			||||||
				res = -EBADF;
 | 
									res = -EBADF;
 | 
				
			||||||
			asprintf(&error, "error get output format: %s", spa_strerror(res));
 | 
								asprintf(&error, "error get output format: %s", spa_strerror(res));
 | 
				
			||||||
| 
						 | 
					@ -238,7 +238,7 @@ static int do_negotiate(struct pw_link *this, uint32_t in_state, uint32_t out_st
 | 
				
			||||||
		if ((res = spa_node_port_enum_params(input->node->node,
 | 
							if ((res = spa_node_port_enum_params(input->node->node,
 | 
				
			||||||
						     input->direction, input->port_id,
 | 
											     input->direction, input->port_id,
 | 
				
			||||||
						     SPA_PARAM_Format, &index,
 | 
											     SPA_PARAM_Format, &index,
 | 
				
			||||||
						     format, ¤t, &b)) <= 0) {
 | 
											     NULL, ¤t, &b)) <= 0) {
 | 
				
			||||||
			if (res == 0)
 | 
								if (res == 0)
 | 
				
			||||||
				res = -EBADF;
 | 
									res = -EBADF;
 | 
				
			||||||
			asprintf(&error, "error get input format: %s", spa_strerror(res));
 | 
								asprintf(&error, "error get input format: %s", spa_strerror(res));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue