media: unref pipeline in finalize to avoid leaking it
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 28 Nov 2012 11:39:37 +0000 (12:39 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 28 Nov 2012 11:39:37 +0000 (12:39 +0100)
gst/rtsp-server/rtsp-media.c
gst/rtsp-server/rtsp-media.h

index e5abb0e..3fee991 100644 (file)
@@ -171,6 +171,8 @@ gst_rtsp_media_finalize (GObject * obj)
 
   g_list_free_full (media->dynamic, gst_object_unref);
 
+  if (media->pipeline)
+    gst_object_unref (media->pipeline);
   if (media->auth)
     g_object_unref (media->auth);
   if (media->pool)
@@ -666,7 +668,6 @@ gst_rtsp_media_collect_streams (GstRTSPMedia * media)
       /* create the stream */
       gst_rtsp_media_create_stream (media, elem, pad);
       gst_object_unref (pad);
-
       gst_object_unref (elem);
 
       have_elem = TRUE;
index b848a10..64cda5e 100644 (file)
@@ -76,7 +76,7 @@ typedef enum {
  * @buffer_size: The UDP buffer size
  * @auth: the authentication service in use
  * @multicast_group: the multicast group to use
- * @element: the data providing element
+ * @element: the data providing element, owned by @pipeline
  * @streams: the different #GstRTSPStream provided by @element
  * @dynamic: list of dynamic elements managed by @element
  * @status: the status of the media pipeline