From: Wim Taymans Date: Fri, 30 Nov 2012 13:36:30 +0000 (+0100) Subject: Revert "client: never call gst_rtsp_media_unprepare, let gst_rtsp_media_finalize... X-Git-Tag: 1.19.3~495^2~1205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38addd7822a9dbcfd959d8b3f05d3302e2ca28c3;p=platform%2Fupstream%2Fgstreamer.git Revert "client: never call gst_rtsp_media_unprepare, let gst_rtsp_media_finalize do it" This reverts commit ba5b78ff2ff223049188eb456e228c709ccd3e05. We can't use the refcount to trigger unprepare because it is the unprepare call that removes the last refcount after all messages are consumed. What we should probably do is make a prepared refcount and only unprepare when the refcount reaches 0. --- diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index becfb0e..e8f3957 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -278,6 +278,7 @@ gst_rtsp_client_finalize (GObject * obj) if (priv->uri) gst_rtsp_url_free (priv->uri); if (priv->media) { + gst_rtsp_media_unprepare (priv->media); g_object_unref (priv->media); } @@ -435,6 +436,7 @@ find_media (GstRTSPClient * client, GstRTSPClientState * state) gst_rtsp_url_free (priv->uri); priv->uri = NULL; if (priv->media) { + gst_rtsp_media_unprepare (priv->media); g_object_unref (priv->media); } priv->media = NULL;