stream: clear session and caps for reuse
authorOgnyan Tonchev <ognyan@axis.com>
Mon, 22 Apr 2013 14:09:22 +0000 (16:09 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 22 Apr 2013 14:09:22 +0000 (16:09 +0200)
Set the session and caps to NULL after unref otherwise we might unref
them again later.

See https://bugzilla.gnome.org/show_bug.cgi?id=698376

gst/rtsp-server/rtsp-stream.c

index eb64c2d..ebf50a0 100644 (file)
@@ -1220,8 +1220,10 @@ gst_rtsp_stream_leave_bin (GstRTSPStream * stream, GstBin * bin,
   priv->send_src[1] = NULL;
 
   g_object_unref (priv->session);
+  priv->session = NULL;
   if (priv->caps)
     gst_caps_unref (priv->caps);
+  priv->caps = NULL;
 
   priv->is_joined = FALSE;
   g_mutex_unlock (&priv->lock);