From ec0fd20ca5066121b8ba6484bccc50055acaa36d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 16 Jun 2017 16:23:57 +0200 Subject: [PATCH] stream: cleanups --- pipewire/client/stream.c | 5 ++++- pipewire/client/stream.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pipewire/client/stream.c b/pipewire/client/stream.c index d7ac73925..f84eeb767 100644 --- a/pipewire/client/stream.c +++ b/pipewire/client/stream.c @@ -1009,7 +1009,10 @@ bool pw_stream_disconnect(struct pw_stream *stream) unhandle_socket(stream); - pw_client_node_do_destroy(impl->node_proxy); + if (impl->node_proxy) { + pw_client_node_do_destroy(impl->node_proxy); + impl->node_proxy = NULL; + } return true; } diff --git a/pipewire/client/stream.h b/pipewire/client/stream.h index 2358e5205..7293f9c2d 100644 --- a/pipewire/client/stream.h +++ b/pipewire/client/stream.h @@ -219,7 +219,8 @@ struct pw_stream { PW_SIGNAL(state_changed, (struct pw_listener *listener, struct pw_stream *stream)); /** Emited when the format changed. The listener should call - * pw_stream_finish_format() to complete format negotiation */ + * pw_stream_finish_format() from within this signal or later to complete + * the format negotiation */ PW_SIGNAL(format_changed, (struct pw_listener *listener, struct pw_stream *stream, struct spa_format *format));