From 66abee92b081a1f74c0e3ca5600b99e78fb3b569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Wed, 1 Oct 2014 15:04:09 -0700 Subject: [PATCH] rtspconnection: call watch notify before freeing any watch resources This gives control to the notify function allowing it to finish other watch related functionality. https://bugzilla.gnome.org/show_bug.cgi?id=737752 --- gst-libs/gst/rtsp/gstrtspconnection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 559b989b66..23ba516c9a 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -3395,6 +3395,9 @@ gst_rtsp_source_finalize (GSource * source) { GstRTSPWatch *watch = (GstRTSPWatch *) source; + if (watch->notify) + watch->notify (watch->user_data); + build_reset (&watch->builder); gst_rtsp_message_unset (&watch->message); @@ -3414,9 +3417,6 @@ gst_rtsp_source_finalize (GSource * source) g_source_unref (watch->controlsrc); g_mutex_clear (&watch->mutex); - - if (watch->notify) - watch->notify (watch->user_data); } static GSourceFuncs gst_rtsp_source_funcs = {