mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
stream: remove listener on disconnect
This commit is contained in:
parent
6430ca0093
commit
a1e567b985
1 changed files with 5 additions and 1 deletions
|
|
@ -788,6 +788,7 @@ static void proxy_destroy(void *_data)
|
|||
{
|
||||
struct pw_stream *stream = _data;
|
||||
stream->proxy = NULL;
|
||||
spa_hook_remove(&stream->proxy_listener);
|
||||
stream_set_state(stream, PW_STREAM_STATE_UNCONNECTED, NULL);
|
||||
}
|
||||
|
||||
|
|
@ -1148,7 +1149,10 @@ int pw_stream_disconnect(struct pw_stream *stream)
|
|||
pw_node_destroy(impl->node);
|
||||
impl->node = NULL;
|
||||
}
|
||||
if (stream->proxy) {
|
||||
stream->proxy = NULL;
|
||||
spa_hook_remove(&stream->proxy_listener);
|
||||
}
|
||||
stream_set_state(stream, PW_STREAM_STATE_UNCONNECTED, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue