From 0bdff0161c14ccc29c60c3296c748b1434ecde0a Mon Sep 17 00:00:00 2001 From: Ognyan Tonchev Date: Mon, 22 Apr 2013 16:19:35 +0200 Subject: [PATCH] media: don't unref the pipeline in unprepare 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 2f7d498a3e..e30bc0e742 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -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;