mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
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:
parent
e0d1be32fd
commit
1a44689d3f
1 changed files with 6 additions and 0 deletions
|
|
@ -404,6 +404,12 @@ static const struct pw_proxy_events core_proxy_events = {
|
||||||
|
|
||||||
static void impl_destroy(struct impl *impl)
|
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)
|
if (impl->capture)
|
||||||
pw_stream_destroy(impl->capture);
|
pw_stream_destroy(impl->capture);
|
||||||
if (impl->playback)
|
if (impl->playback)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue