Commit 621e140a authored by Benjamin Berg's avatar Benjamin Berg Committed by Tim-Philipp Müller

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.
parent a48711fa
Pipeline #16830 passed with stages
in 18 minutes and 57 seconds
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment