mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	small cleanups
This commit is contained in:
		
							parent
							
								
									d88b88444d
								
							
						
					
					
						commit
						008df86c8f
					
				
					 3 changed files with 11 additions and 9 deletions
				
			
		| 
						 | 
					@ -226,9 +226,6 @@ static int negotiate_link_format(struct impl *this, struct link *link)
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		filter = NULL;
 | 
							filter = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (filter)
 | 
					 | 
				
			||||||
		spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (link->out_node != NULL) {
 | 
						if (link->out_node != NULL) {
 | 
				
			||||||
		state = 0;
 | 
							state = 0;
 | 
				
			||||||
		if ((res = spa_node_port_enum_params(link->out_node,
 | 
							if ((res = spa_node_port_enum_params(link->out_node,
 | 
				
			||||||
| 
						 | 
					@ -239,8 +236,6 @@ static int negotiate_link_format(struct impl *this, struct link *link)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		filter = format;
 | 
							filter = format;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (filter)
 | 
					 | 
				
			||||||
		spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT);
 | 
					 | 
				
			||||||
	if (link->in_node != NULL) {
 | 
						if (link->in_node != NULL) {
 | 
				
			||||||
		state = 0;
 | 
							state = 0;
 | 
				
			||||||
		if ((res = spa_node_port_enum_params(link->in_node,
 | 
							if ((res = spa_node_port_enum_params(link->in_node,
 | 
				
			||||||
| 
						 | 
					@ -253,7 +248,6 @@ static int negotiate_link_format(struct impl *this, struct link *link)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_pod_fixate(filter);
 | 
						spa_pod_fixate(filter);
 | 
				
			||||||
	spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (link->out_node != NULL) {
 | 
						if (link->out_node != NULL) {
 | 
				
			||||||
		if ((res = spa_node_port_set_param(link->out_node,
 | 
							if ((res = spa_node_port_set_param(link->out_node,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -811,7 +811,7 @@ impl_node_port_use_buffers(struct spa_node *node,
 | 
				
			||||||
				size += d->maxsize;
 | 
									size += d->maxsize;
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				b->buffer.datas[j].type = SPA_ID_INVALID;
 | 
									b->buffer.datas[j].type = SPA_ID_INVALID;
 | 
				
			||||||
				b->buffer.datas[j].data = 0;
 | 
									b->buffer.datas[j].data = NULL;
 | 
				
			||||||
				spa_log_error(this->log, "invalid memory type %d", d->type);
 | 
									spa_log_error(this->log, "invalid memory type %d", d->type);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -353,8 +353,16 @@ static int impl_get_port_ids(struct spa_node *node,
 | 
				
			||||||
                             uint32_t *output_ids,
 | 
					                             uint32_t *output_ids,
 | 
				
			||||||
                             uint32_t n_output_ids)
 | 
					                             uint32_t n_output_ids)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						struct stream *impl = SPA_CONTAINER_OF(node, struct stream, impl_node);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (impl->direction == SPA_DIRECTION_INPUT) {
 | 
				
			||||||
 | 
							if (n_input_ids > 0)
 | 
				
			||||||
 | 
						                input_ids[0] = 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						else {
 | 
				
			||||||
		if (n_output_ids > 0)
 | 
							if (n_output_ids > 0)
 | 
				
			||||||
	                output_ids[0] = 0;
 | 
						                output_ids[0] = 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue