mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
client: suspend after SDP and unsuspend before PLAYING
Based on patches by Ognyan Tonchev <ognyan@axis.com> Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711257
This commit is contained in:
parent
2f17369e9d
commit
b1e8172ef3
1 changed files with 13 additions and 0 deletions
|
@ -1074,6 +1074,10 @@ handle_play_request (GstRTSPClient * client, GstRTSPContext * ctx)
|
|||
if (rtspstate != GST_RTSP_STATE_PLAYING && rtspstate != GST_RTSP_STATE_READY)
|
||||
goto invalid_state;
|
||||
|
||||
/* in play we first unsuspend, media could be suspended from SDP or PAUSED */
|
||||
if (!gst_rtsp_media_unsuspend (media))
|
||||
goto unsuspend_failed;
|
||||
|
||||
/* parse the range header if we have one */
|
||||
res = gst_rtsp_message_get_header (ctx->request, GST_RTSP_HDR_RANGE, &str, 0);
|
||||
if (res == GST_RTSP_OK) {
|
||||
|
@ -1194,6 +1198,13 @@ invalid_state:
|
|||
g_free (path);
|
||||
return FALSE;
|
||||
}
|
||||
unsuspend_failed:
|
||||
{
|
||||
GST_ERROR ("client %p: unsuspend failed", client);
|
||||
send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
|
||||
g_free (path);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1755,6 +1766,8 @@ handle_describe_request (GstRTSPClient * client, GstRTSPContext * ctx)
|
|||
if (!(sdp = klass->create_sdp (client, media)))
|
||||
goto no_sdp;
|
||||
|
||||
/* we suspend after the describe */
|
||||
gst_rtsp_media_suspend (media);
|
||||
g_object_unref (media);
|
||||
|
||||
gst_rtsp_message_init_response (ctx->response, GST_RTSP_STS_OK,
|
||||
|
|
Loading…
Reference in a new issue