stream: Only disconnect once

When a stream is destroyed while disconnecting, don't try to disconnect
again.

Fixes #280
This commit is contained in:
Wim Taymans 2020-09-07 16:06:20 +02:00
parent f541bf9037
commit 9abcff8312
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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);