mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
media: also handle prepare and range in suspended state
When we are suspended, we are already prepared. We can get the range in the suspended state.
This commit is contained in:
parent
b16b47f68d
commit
53859ac34b
2 changed files with 8 additions and 4 deletions
|
@ -1937,10 +1937,12 @@ handle_request (GstRTSPClient * client, GstRTSPMessage * request)
|
|||
gst_rtsp_message_dump (request);
|
||||
}
|
||||
|
||||
GST_INFO ("client %p: received a request", client);
|
||||
|
||||
gst_rtsp_message_parse_request (request, &method, &uristr, &version);
|
||||
|
||||
GST_INFO ("client %p: received a request %s %s %s", client,
|
||||
gst_rtsp_method_as_text (method), uristr,
|
||||
gst_rtsp_version_as_text (version));
|
||||
|
||||
/* we can only handle 1.0 requests */
|
||||
if (version != GST_RTSP_VERSION_1_0)
|
||||
goto not_supported;
|
||||
|
|
|
@ -1325,7 +1325,8 @@ gst_rtsp_media_get_range_string (GstRTSPMedia * media, gboolean play,
|
|||
priv = media->priv;
|
||||
|
||||
g_rec_mutex_lock (&priv->state_lock);
|
||||
if (priv->status != GST_RTSP_MEDIA_STATUS_PREPARED)
|
||||
if (priv->status != GST_RTSP_MEDIA_STATUS_PREPARED &&
|
||||
priv->status != GST_RTSP_MEDIA_STATUS_SUSPENDED)
|
||||
goto not_prepared;
|
||||
|
||||
g_mutex_lock (&priv->lock);
|
||||
|
@ -1993,7 +1994,8 @@ gst_rtsp_media_prepare (GstRTSPMedia * media, GstRTSPThread * thread)
|
|||
g_rec_mutex_lock (&priv->state_lock);
|
||||
priv->prepare_count++;
|
||||
|
||||
if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARED)
|
||||
if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARED ||
|
||||
priv->status == GST_RTSP_MEDIA_STATUS_SUSPENDED)
|
||||
goto was_prepared;
|
||||
|
||||
if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARING)
|
||||
|
|
Loading…
Reference in a new issue