mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
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:
parent
7c267928ff
commit
a455181aff
2 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue