summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-10-07 13:00:10 +0300
committerTim-Philipp Müller <tim@centricular.com>2022-02-01 18:38:04 +0000
commitb548f3d1db9f6e087a365d2af3a8bce13e1822d1 (patch)
tree879c24e8732b3e9a0c9e7e66f49187a7fb009b76
parent94542de2e6d63e5e08cbf19516db5d5f0ee6f7da (diff)
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/gst-rtsp-server/-/merge_requests/221>
-rw-r--r--gst/rtsp-server/rtsp-media.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index 0f8b3af..ba73384 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -4090,7 +4090,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);