mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
modules: disconnect streams before destroy
So that they are both stopped before being destroyed.
This commit is contained in:
parent
1e848fc299
commit
38e8e76f76
2 changed files with 10 additions and 0 deletions
|
|
@ -2080,12 +2080,20 @@ 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)
|
||||||
pw_stream_destroy(impl->playback);
|
pw_stream_destroy(impl->playback);
|
||||||
|
|
||||||
if (impl->core && impl->do_disconnect)
|
if (impl->core && impl->do_disconnect)
|
||||||
pw_core_disconnect(impl->core);
|
pw_core_disconnect(impl->core);
|
||||||
|
|
||||||
pw_properties_free(impl->capture_props);
|
pw_properties_free(impl->capture_props);
|
||||||
pw_properties_free(impl->playback_props);
|
pw_properties_free(impl->playback_props);
|
||||||
graph_free(&impl->graph);
|
graph_free(&impl->graph);
|
||||||
|
|
|
||||||
|
|
@ -414,8 +414,10 @@ static void impl_destroy(struct impl *impl)
|
||||||
pw_stream_destroy(impl->capture);
|
pw_stream_destroy(impl->capture);
|
||||||
if (impl->playback)
|
if (impl->playback)
|
||||||
pw_stream_destroy(impl->playback);
|
pw_stream_destroy(impl->playback);
|
||||||
|
|
||||||
if (impl->core && impl->do_disconnect)
|
if (impl->core && impl->do_disconnect)
|
||||||
pw_core_disconnect(impl->core);
|
pw_core_disconnect(impl->core);
|
||||||
|
|
||||||
pw_properties_free(impl->capture_props);
|
pw_properties_free(impl->capture_props);
|
||||||
pw_properties_free(impl->playback_props);
|
pw_properties_free(impl->playback_props);
|
||||||
free(impl);
|
free(impl);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue