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
This commit is contained in:
Aleix Conchillo Flaqué 2014-10-01 15:04:09 -07:00 committed by Wim Taymans
parent 6129d1bd18
commit 66abee92b0

View file

@ -3395,6 +3395,9 @@ gst_rtsp_source_finalize (GSource * source)
{ {
GstRTSPWatch *watch = (GstRTSPWatch *) source; GstRTSPWatch *watch = (GstRTSPWatch *) source;
if (watch->notify)
watch->notify (watch->user_data);
build_reset (&watch->builder); build_reset (&watch->builder);
gst_rtsp_message_unset (&watch->message); gst_rtsp_message_unset (&watch->message);
@ -3414,9 +3417,6 @@ gst_rtsp_source_finalize (GSource * source)
g_source_unref (watch->controlsrc); g_source_unref (watch->controlsrc);
g_mutex_clear (&watch->mutex); g_mutex_clear (&watch->mutex);
if (watch->notify)
watch->notify (watch->user_data);
} }
static GSourceFuncs gst_rtsp_source_funcs = { static GSourceFuncs gst_rtsp_source_funcs = {