From 5a30d82d7e7991ee6a27f86b1d60e05f765786fc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 23 Jun 2023 15:04:20 +0200 Subject: [PATCH] impl-port: avoid doing port calls when destroying When we are destroying a port, don't try to clear io and format, the port is already gone. --- src/pipewire/impl-port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pipewire/impl-port.c b/src/pipewire/impl-port.c index daf9d0a36..1f7a29851 100644 --- a/src/pipewire/impl-port.c +++ b/src/pipewire/impl-port.c @@ -331,6 +331,9 @@ int pw_impl_port_release_mix(struct pw_impl_port *port, struct pw_impl_port_mix res = pw_impl_port_call_release_mix(port, mix); + if (port->destroying) + return res; + if ((res = spa_node_remove_port(port->mix, port->direction, port_id)) < 0 && res != -ENOTSUP) pw_log_warn("can't remove mix port %d: %s", port_id, spa_strerror(res));