mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
rtsp-client: Use watch_context before unref
Move the usage of priv->watch_context to beginning of function gst_rtsp_client_finalize. Instead of use it after g_main_context_unref (priv->watch_context).
This commit is contained in:
parent
8410c69da9
commit
daa18dc867
1 changed files with 8 additions and 8 deletions
|
@ -763,6 +763,14 @@ gst_rtsp_client_finalize (GObject * obj)
|
||||||
|
|
||||||
GST_INFO ("finalize client %p", client);
|
GST_INFO ("finalize client %p", client);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->watch)
|
if (priv->watch)
|
||||||
gst_rtsp_watch_set_flushing (priv->watch, TRUE);
|
gst_rtsp_watch_set_flushing (priv->watch, TRUE);
|
||||||
gst_rtsp_client_set_send_func (client, NULL, NULL, NULL);
|
gst_rtsp_client_set_send_func (client, NULL, NULL, NULL);
|
||||||
|
@ -798,14 +806,6 @@ gst_rtsp_client_finalize (GObject * obj)
|
||||||
|
|
||||||
clean_cached_media (client, TRUE);
|
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_free (priv->server_ip);
|
||||||
g_mutex_clear (&priv->lock);
|
g_mutex_clear (&priv->lock);
|
||||||
g_mutex_clear (&priv->send_lock);
|
g_mutex_clear (&priv->send_lock);
|
||||||
|
|
Loading…
Reference in a new issue