summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorLinus Svensson <linussn@axis.com>2014-10-23 12:54:03 +0200
committerWim Taymans <wtaymans@redhat.com>2014-11-07 12:34:23 +0100
commita455181aff9231c4a00777f456a80d6de1019f05 (patch)
tree193ba9c7fc7191c77a6515b4b475acd817d9fb2d /gst
parent7c267928ff8a74c15fe0821985c96d9fcda97f30 (diff)
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
Diffstat (limited to 'gst')
-rw-r--r--gst/rtsp-server/rtsp-client.c8
-rw-r--r--gst/rtsp-server/rtsp-session-media.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 934a3a7..c26bf6c 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -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);
}
diff --git a/gst/rtsp-server/rtsp-session-media.c b/gst/rtsp-server/rtsp-session-media.c
index 8eb1f28..e319241 100644
--- a/gst/rtsp-server/rtsp-session-media.c
+++ b/gst/rtsp-server/rtsp-session-media.c
@@ -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);