JACK: check the io of the right cycle

The port->io always points to a 2 item ptrarray of buffers so check
if there is actually a buffer for the current cycle instead.

Avoids a crash.
This commit is contained in:
Wim Taymans 2024-06-10 10:16:44 +02:00
parent cfeb937443
commit b144aa24fa

View File

@ -1610,7 +1610,7 @@ static void prepare_output(struct port *p, uint32_t frames, uint32_t cycle)
return;
spa_list_for_each(mix, &p->mix, port_link) {
if (SPA_LIKELY(mix->io != NULL))
if (SPA_LIKELY(mix->io[cycle] != NULL))
*mix->io[cycle] = *io;
}
}