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 56786aedc4

See #3514
This commit is contained in:
Wim Taymans 2023-10-19 12:14:56 +02:00
parent 27426e12c5
commit 13f52f4297

View file

@ -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) static void prepare_output(struct port *p, uint32_t frames)
{ {
struct mix *mix; struct mix *mix;
struct spa_io_buffers *io;
if (SPA_UNLIKELY(p->empty_out || p->tied)) if (SPA_UNLIKELY(p->empty_out || p->tied))
process_empty(p, frames); 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) { spa_list_for_each(mix, &p->mix, port_link) {
if (SPA_LIKELY(mix->io != NULL)) 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) static void complete_process(struct client *c, uint32_t frames)