mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	splitter: fix bpf
Number of channels does not influence bytes-per-frame for non-interleaved audio. Add layout to get_format
This commit is contained in:
		
							parent
							
								
									b3c842a7ec
								
							
						
					
					
						commit
						e74c41bdf6
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -420,6 +420,7 @@ static int port_get_format(struct spa_node *node,
 | 
				
			||||||
		"I", t->media_type.audio,
 | 
							"I", t->media_type.audio,
 | 
				
			||||||
		"I", t->media_subtype.raw,
 | 
							"I", t->media_subtype.raw,
 | 
				
			||||||
		":", t->format_audio.format,   "I", this->format.info.raw.format,
 | 
							":", t->format_audio.format,   "I", this->format.info.raw.format,
 | 
				
			||||||
 | 
							":", t->format_audio.layout,   "i", this->format.info.raw.layout,
 | 
				
			||||||
		":", t->format_audio.rate,     "i", this->format.info.raw.rate,
 | 
							":", t->format_audio.rate,     "i", this->format.info.raw.rate,
 | 
				
			||||||
		":", t->format_audio.channels, "i", this->format.info.raw.channels);
 | 
							":", t->format_audio.channels, "i", this->format.info.raw.channels);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -598,7 +599,6 @@ static int port_set_format(struct spa_node *node,
 | 
				
			||||||
		if (direction == SPA_DIRECTION_INPUT) {
 | 
							if (direction == SPA_DIRECTION_INPUT) {
 | 
				
			||||||
			if (info.info.raw.channels != this->port_count)
 | 
								if (info.info.raw.channels != this->port_count)
 | 
				
			||||||
				return -EINVAL;
 | 
									return -EINVAL;
 | 
				
			||||||
			this->bpf *= this->port_count;
 | 
					 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			if (info.info.raw.channels != 1)
 | 
								if (info.info.raw.channels != 1)
 | 
				
			||||||
				return -EINVAL;
 | 
									return -EINVAL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue