mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
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.
This commit is contained in:
parent
a48711fa9d
commit
621e140a8e
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue