mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
jack: actually clear the mix io
When we are asked to clear the mix io areas, actually do it, otherwise the process thread might still be accessing the old memory and crash. Also check that we have set io on the port before we decrement the counter with active io or else we have a negative value and cause problems later. This can happen when we susupend and set io to NULL but there was never any io set on the port. Fixes #4337
This commit is contained in:
parent
0cc6ac2769
commit
885f8ab517
1 changed files with 3 additions and 1 deletions
|
|
@ -600,7 +600,9 @@ do_mix_set_io(struct spa_loop *loop, bool async, uint32_t seq,
|
|||
port->global_mix->io[1] = &port->io[1];
|
||||
}
|
||||
} else {
|
||||
if (--port->n_mix == 0 && port->global_mix != NULL) {
|
||||
info->mix->io[0] = NULL;
|
||||
info->mix->io[1] = NULL;
|
||||
if (port->n_mix > 0 && --port->n_mix == 0 && port->global_mix != NULL) {
|
||||
port->global_mix->io[0] = NULL;
|
||||
port->global_mix->io[1] = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue