client: Stop caching media in client when doing setup

If the media has been managed by a session media, it should not be
cached in the client any longer. The GstRTSPSessionMedia object is now
responsible for unpreparing the GstRTSPMedia object using
gst_rtsp_media_unprepare(). Unprepare the media when finalizing the
session media.

https://bugzilla.gnome.org/show_bug.cgi?id=739112
This commit is contained in:
Linus Svensson 2014-10-23 12:54:03 +02:00 committed by Wim Taymans
parent 7c267928ff
commit a455181aff
2 changed files with 10 additions and 0 deletions

View file

@ -1827,6 +1827,14 @@ handle_setup_request (GstRTSPClient * client, GstRTSPContext * ctx)
/* if we stil have no media, error */
if (sessmedia == NULL)
goto sessmedia_unavailable;
/* don't cache media anymore */
if (priv->path)
g_free (priv->path);
priv->path = NULL;
if (priv->media)
g_object_unref (priv->media);
priv->media = NULL;
} else {
g_object_unref (media);
}

View file

@ -104,6 +104,8 @@ gst_rtsp_session_media_finalize (GObject * obj)
gst_rtsp_session_media_set_state (media, GST_STATE_NULL);
gst_rtsp_media_unprepare (priv->media);
g_ptr_array_unref (priv->transports);
g_free (priv->path);