mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-02 14:20:06 +00:00
rtsp-client: Remove timeout GSource on cleanup
Avoids ending up with races where a timeout would still be around *after* a client was gone. This could happen rather easily in RTSP-over-HTTP mode on a local connection, where each RTSP message would be sent as a different HTTP connection with the same tunnelid. If not properly removed, that timeout would then try to free again a client (and its contents).
This commit is contained in:
parent
22ced50da5
commit
ebafccb65a
1 changed files with 8 additions and 0 deletions
|
@ -782,6 +782,14 @@ gst_rtsp_client_finalize (GObject * obj)
|
|||
|
||||
clean_cached_media (client, TRUE);
|
||||
|
||||
if (priv->rtsp_ctrl_timeout_id != 0) {
|
||||
GST_DEBUG ("Killing leftover timeout GSource for client %p", client);
|
||||
g_source_destroy (g_main_context_find_source_by_id (priv->watch_context,
|
||||
priv->rtsp_ctrl_timeout_id));
|
||||
priv->rtsp_ctrl_timeout_id = 0;
|
||||
priv->rtsp_ctrl_timeout_cnt = 0;
|
||||
}
|
||||
|
||||
g_free (priv->server_ip);
|
||||
g_mutex_clear (&priv->lock);
|
||||
g_mutex_clear (&priv->send_lock);
|
||||
|
|
Loading…
Reference in a new issue