rtsp-media: Unprepare suspended medias too

Previously suspended medias immediately reached the UNPREPARED state
without going through the media's unprepare() vfunc. This didn't allow
the media subclass to do any additional cleanup, and for example the
shutdown-eos property of GstRTSPMedia was ignored.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1090>
This commit is contained in:
Sebastian Dröge 2021-10-07 13:00:10 +03:00 committed by GStreamer Marge Bot
parent 314901a208
commit 14d636b224

View file

@ -4108,7 +4108,8 @@ gst_rtsp_media_unprepare (GstRTSPMedia * media)
set_target_state (media, GST_STATE_NULL, FALSE);
success = TRUE;
if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARED) {
if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARED
|| priv->status == GST_RTSP_MEDIA_STATUS_SUSPENDED) {
GstRTSPMediaClass *klass;
klass = GST_RTSP_MEDIA_GET_CLASS (media);