mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	mixer-dsp: only use passthrough when DYNAMIC_DATA
We can only change the data pointers on the output buffer when the data had the DYNAMIC_DATA flag.
This commit is contained in:
		
							parent
							
								
									91ae1c13b7
								
							
						
					
					
						commit
						4625f7ee3a
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -727,6 +727,7 @@ static int impl_node_process(void *object)
 | 
				
			||||||
	struct buffer *outb;
 | 
						struct buffer *outb;
 | 
				
			||||||
	const void **datas;
 | 
						const void **datas;
 | 
				
			||||||
	uint32_t cycle = this->position->clock.cycle & 1;
 | 
						uint32_t cycle = this->position->clock.cycle & 1;
 | 
				
			||||||
 | 
						struct spa_data *d;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_return_val_if_fail(this != NULL, -EINVAL);
 | 
						spa_return_val_if_fail(this != NULL, -EINVAL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -793,11 +794,12 @@ static int impl_node_process(void *object)
 | 
				
			||||||
		return -EPIPE;
 | 
							return -EPIPE;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (n_buffers == 1) {
 | 
						d = outb->buf.datas;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (n_buffers == 1 && SPA_FLAG_IS_SET(d[0].flags, SPA_DATA_FLAG_DYNAMIC)) {
 | 
				
			||||||
 | 
							spa_log_trace_fp(this->log, "%p: %d passthrough", this, n_buffers);
 | 
				
			||||||
		*outb->buffer = *buffers[0]->buffer;
 | 
							*outb->buffer = *buffers[0]->buffer;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		struct spa_data *d = outb->buf.datas;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		*outb->buffer = outb->buf;
 | 
							*outb->buffer = outb->buf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		maxsize = SPA_MIN(maxsize, d[0].maxsize);
 | 
							maxsize = SPA_MIN(maxsize, d[0].maxsize);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue