From 4625f7ee3a7c5e6ec1276df8fb8c16788c4612f2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 1 Oct 2025 11:13:42 +0200 Subject: [PATCH] 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. --- spa/plugins/audiomixer/mixer-dsp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spa/plugins/audiomixer/mixer-dsp.c b/spa/plugins/audiomixer/mixer-dsp.c index c3c17f541..83af86ea5 100644 --- a/spa/plugins/audiomixer/mixer-dsp.c +++ b/spa/plugins/audiomixer/mixer-dsp.c @@ -727,6 +727,7 @@ static int impl_node_process(void *object) struct buffer *outb; const void **datas; uint32_t cycle = this->position->clock.cycle & 1; + struct spa_data *d; spa_return_val_if_fail(this != NULL, -EINVAL); @@ -793,11 +794,12 @@ static int impl_node_process(void *object) 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; } else { - struct spa_data *d = outb->buf.datas; - *outb->buffer = outb->buf; maxsize = SPA_MIN(maxsize, d[0].maxsize);