media: don't unref the pipeline in unprepare
authorOgnyan Tonchev <ognyan@axis.com>
Mon, 22 Apr 2013 14:19:35 +0000 (16:19 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 22 Apr 2013 14:19:35 +0000 (16:19 +0200)
Unprepare() should undo what prepare() does. Because the pipeline is
not created in prepare(), we should not unref it in unprepare()

gst/rtsp-server/rtsp-media.c

index 2f7d498..e30bc0e 100644 (file)
@@ -1410,8 +1410,9 @@ no_more_pads_cb (GstElement * element, GstRTSPMedia * media)
  * gst_rtsp_media_prepare:
  * @media: a #GstRTSPMedia
  *
- * Prepare @media for streaming. This function will create the pipeline and
- * other objects to manage the streaming.
+ * Prepare @media for streaming. This function will create the objects
+ * to manage the streaming. A pipeline must have been set on @media with
+ * gst_rtsp_media_take_pipeline().
  *
  * It will preroll the pipeline and collect vital information about the streams
  * such as the duration.
@@ -1612,9 +1613,6 @@ finish_unprepare (GstRTSPMedia * media)
     gst_object_unref (priv->nettime);
   priv->nettime = NULL;
 
-  gst_object_unref (priv->pipeline);
-  priv->pipeline = NULL;
-
   priv->reused = TRUE;
   priv->status = GST_RTSP_MEDIA_STATUS_UNPREPARED;