From 13f52f4297924b425606df41a560ffe6e2b3735c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 19 Oct 2023 12:14:56 +0200 Subject: [PATCH] jack: don't require global-mix in prepare_output We can directly use the port io, which is always available. This ensures the mix->io status is set to NEED_DATA even when there is no global mix. This reverts part of 56786aedc4a265946e3bd9794123c80d92ebe47a See #3514 --- pipewire-jack/src/pipewire-jack.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 0817c87aa..7ec2408dc 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -1519,19 +1519,15 @@ static inline void process_empty(struct port *p, uint32_t frames) static void prepare_output(struct port *p, uint32_t frames) { struct mix *mix; - struct spa_io_buffers *io; if (SPA_UNLIKELY(p->empty_out || p->tied)) process_empty(p, frames); - if (p->global_mix == NULL || (io = p->global_mix->io) == NULL) - return; - spa_list_for_each(mix, &p->mix, port_link) { if (SPA_LIKELY(mix->io != NULL)) - *mix->io = *io; + *mix->io = p->io; } - io->status = SPA_STATUS_NEED_DATA; + p->io.status = SPA_STATUS_NEED_DATA; } static void complete_process(struct client *c, uint32_t frames)