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,6 +1104,7 @@ void pw_filter_destroy(struct pw_filter *filter)
pw_filter_emit_destroy(filter);
if (!impl->disconnecting)
pw_filter_disconnect(filter);
spa_list_consume(p, &impl->port_list, link)

View file

@ -1258,6 +1258,7 @@ void pw_stream_destroy(struct pw_stream *stream)
pw_stream_emit_destroy(stream);
if (!impl->disconnecting)
pw_stream_disconnect(stream);
if (stream->core) {