module-loopback: Disconnect streams before destroying

Disconnect both streams before destroying any of them so that
playback_process() doesn't get called after the capture stream has been
destroyed.
This commit is contained in:
Jonas Holmberg 2022-09-26 16:47:33 +02:00
parent e0d1be32fd
commit 1a44689d3f

View file

@ -404,6 +404,12 @@ static const struct pw_proxy_events core_proxy_events = {
static void impl_destroy(struct impl *impl)
{
/* disconnect both streams before destroying any of them */
if (impl->capture)
pw_stream_disconnect(impl->capture);
if (impl->playback)
pw_stream_disconnect(impl->playback);
if (impl->capture)
pw_stream_destroy(impl->capture);
if (impl->playback)