impl-port: clear port Format when no mixers

Bring the state to CONFIGURE by actually setting the FORMAT to NULL when
we remove the last mixer. Otherwise the buffers and formats are still on
the port and we might try to use them while negotiating a new format
later.

Avoids some crashes.
This commit is contained in:
Wim Taymans 2023-06-23 11:13:45 +02:00
parent b464d2145d
commit 0fb99d4421

View file

@ -345,7 +345,7 @@ int pw_impl_port_release_mix(struct pw_impl_port *port, struct pw_impl_port_mix
SPA_IO_Buffers,
NULL, sizeof(port->rt.io));
pw_impl_port_update_state(port, PW_IMPL_PORT_STATE_CONFIGURE, 0, NULL);
pw_impl_port_set_param(port, SPA_PARAM_Format, 0, NULL);
}
return res;
}