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.
if (priv->uri)
gst_rtsp_url_free (priv->uri);
if (priv->media) {
+ gst_rtsp_media_unprepare (priv->media);
g_object_unref (priv->media);
}
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;