rtsp-media: Also mark receive-only (RECORD) medias as prepared when unsuspending
authorSebastian Dröge <sebastian@centricular.com>
Tue, 5 Oct 2021 16:37:40 +0000 (19:37 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 5 Oct 2021 16:40:07 +0000 (16:40 +0000)
Previously the status was only changed for other medias.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1058>

subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c

index f2d498a..2ff875b 100644 (file)
@@ -4632,9 +4632,8 @@ default_unsuspend (GstRTSPMedia * media)
 
   switch (priv->suspend_mode) {
     case GST_RTSP_SUSPEND_MODE_NONE:
-      if (gst_rtsp_media_is_receive_only (media))
-        break;
-      if (media_streams_blocking (media)) {
+      if (!gst_rtsp_media_is_receive_only (media)
+          && media_streams_blocking (media)) {
         g_rec_mutex_unlock (&priv->state_lock);
         if (gst_rtsp_media_get_status (media) == GST_RTSP_MEDIA_STATUS_ERROR) {
           g_rec_mutex_lock (&priv->state_lock);