diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-09-07 16:06:20 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-09-07 16:06:20 +0200 |
commit | 9abcff831211c8ed1fd9d4f098c0d1f696e1db42 (patch) | |
tree | ffb52e1e0151860d157ab0346364fad9b215c0bb | |
parent | f541bf90379b7afb874981faec58922c8069c595 (diff) |
stream: Only disconnect once
When a stream is destroyed while disconnecting, don't try to disconnect
again.
Fixes #280
-rw-r--r-- | src/pipewire/filter.c | 3 | ||||
-rw-r--r-- | src/pipewire/stream.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index 4bfcba85..c366d310 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -1104,7 +1104,8 @@ void pw_filter_destroy(struct pw_filter *filter) pw_filter_emit_destroy(filter); - pw_filter_disconnect(filter); + if (!impl->disconnecting) + pw_filter_disconnect(filter); spa_list_consume(p, &impl->port_list, link) pw_filter_remove_port(p->user_data); diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 0e062121..c03c3b32 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1258,7 +1258,8 @@ void pw_stream_destroy(struct pw_stream *stream) pw_stream_emit_destroy(stream); - pw_stream_disconnect(stream); + if (!impl->disconnecting) + pw_stream_disconnect(stream); if (stream->core) { spa_hook_remove(&stream->core_listener); |