diff options
author | Benjamin Berg <bberg@redhat.com> | 2018-12-04 14:12:04 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-01-29 18:34:08 +0000 |
commit | 621e140a8efd081a243c732940d886cb363a1399 (patch) | |
tree | d42c52043dbe1f51399b6de3530d9916cc32b6ca | |
parent | a48711fa9d277a8e50ea6be7fb53a1808bb7ef72 (diff) | |
download | gstreamer-621e140a8efd081a243c732940d886cb363a1399.tar.gz |
client: Fix crash in close handler
The close handler could trigger a crash because it invalidated the
watch_context while still leaving a source attached to it which would be
cleaned up at a later point.
-rw-r--r-- | gst/rtsp-server/rtsp-client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 70196a1091..ce9cbce4e3 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -178,6 +178,8 @@ static void gst_rtsp_client_set_property (GObject * object, guint propid, const GValue * value, GParamSpec * pspec); static void gst_rtsp_client_finalize (GObject * obj); +static void rtsp_ctrl_timeout_remove (GstRTSPClientPrivate * priv); + static GstSDPMessage *create_sdp (GstRTSPClient * client, GstRTSPMedia * media); static gboolean handle_sdp (GstRTSPClient * client, GstRTSPContext * ctx, GstRTSPMedia * media, GstSDPMessage * sdp); @@ -1229,6 +1231,7 @@ gst_rtsp_client_close (GstRTSPClient * client) g_source_destroy ((GSource *) priv->watch); priv->watch = NULL; gst_rtsp_client_set_send_func (client, NULL, NULL, NULL); + rtsp_ctrl_timeout_remove (priv); g_main_context_unref (priv->watch_context); priv->watch_context = NULL; } |