diff options
author | Patricia Muscalu <patricia@axis.com> | 2017-11-23 20:34:03 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2017-11-24 10:52:36 +0100 |
commit | bb29d2e2ee46a1e1b3ffc52a3c0da91e42d82e0b (patch) | |
tree | 354eb2c360475fcf26c54dfc18455c089f181235 | |
parent | de930f2e4d74f1cbf1679aa03ff6f603a5eff5ef (diff) |
rtsp-media: Fix handling in default_unsuspend()
Handle the case when streams are not blocked and media
is suspended from PAUSED.
Change-Id: I2f3d222ea7b9b20a0732ea5dc81a32d17ab75040
https://bugzilla.gnome.org/show_bug.cgi?id=790674
-rw-r--r-- | gst/rtsp-server/rtsp-media.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 6d2d113..aead378 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -3685,11 +3685,16 @@ default_unsuspend (GstRTSPMedia * media) case GST_RTSP_SUSPEND_MODE_NONE: if ((priv->transport_mode & GST_RTSP_TRANSPORT_MODE_RECORD)) break; - gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARING); - /* at this point the media pipeline has been updated and contain all - * specific transport parts: all active streams contain at least one sink - * element and it's safe to unblock any blocked streams that are active */ - media_unblock_linked (media); + if (media_streams_blocking (media)) { + gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARING); + /* at this point the media pipeline has been updated and contain all + * specific transport parts: all active streams contain at least one sink + * element and it's safe to unblock any blocked streams that are active */ + media_unblock_linked (media); + } else { + /* streams are not blocked and media is suspended from PAUSED */ + gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARED); + } 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); |