mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-03 21:25:54 +00:00
rtspsrc: fix locking after moving things around
This commit is contained in:
parent
0b37991344
commit
5534c7d91d
|
@ -5137,8 +5137,6 @@ gst_rtspsrc_retrieve_sdp (GstRTSPSrc * src, GstSDPMessage ** sdp)
|
||||||
guint size;
|
guint size;
|
||||||
gchar *respcont = NULL;
|
gchar *respcont = NULL;
|
||||||
|
|
||||||
GST_RTSP_STATE_LOCK (src);
|
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
src->need_redirect = FALSE;
|
src->need_redirect = FALSE;
|
||||||
|
|
||||||
|
@ -5282,7 +5280,6 @@ cleanup_error:
|
||||||
GST_DEBUG_OBJECT (src, "free connection");
|
GST_DEBUG_OBJECT (src, "free connection");
|
||||||
gst_rtsp_conninfo_close (src, &src->conninfo, TRUE);
|
gst_rtsp_conninfo_close (src, &src->conninfo, TRUE);
|
||||||
}
|
}
|
||||||
GST_RTSP_STATE_UNLOCK (src);
|
|
||||||
gst_rtsp_message_unset (&request);
|
gst_rtsp_message_unset (&request);
|
||||||
gst_rtsp_message_unset (&response);
|
gst_rtsp_message_unset (&response);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -5297,6 +5294,8 @@ gst_rtspsrc_open (GstRTSPSrc * src)
|
||||||
src->methods =
|
src->methods =
|
||||||
GST_RTSP_SETUP | GST_RTSP_PLAY | GST_RTSP_PAUSE | GST_RTSP_TEARDOWN;
|
GST_RTSP_SETUP | GST_RTSP_PLAY | GST_RTSP_PAUSE | GST_RTSP_TEARDOWN;
|
||||||
|
|
||||||
|
GST_RTSP_STATE_LOCK (src);
|
||||||
|
|
||||||
if (src->sdp == NULL) {
|
if (src->sdp == NULL) {
|
||||||
if (!(res = gst_rtspsrc_retrieve_sdp (src, &src->sdp)))
|
if (!(res = gst_rtspsrc_retrieve_sdp (src, &src->sdp)))
|
||||||
goto no_sdp;
|
goto no_sdp;
|
||||||
|
@ -5305,17 +5304,21 @@ gst_rtspsrc_open (GstRTSPSrc * src)
|
||||||
if (!(res = gst_rtspsrc_open_from_sdp (src, src->sdp)))
|
if (!(res = gst_rtspsrc_open_from_sdp (src, src->sdp)))
|
||||||
goto open_failed;
|
goto open_failed;
|
||||||
|
|
||||||
|
GST_RTSP_STATE_UNLOCK (src);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
no_sdp:
|
no_sdp:
|
||||||
{
|
{
|
||||||
GST_WARNING_OBJECT (src, "can't get sdp");
|
GST_WARNING_OBJECT (src, "can't get sdp");
|
||||||
|
GST_RTSP_STATE_UNLOCK (src);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
open_failed:
|
open_failed:
|
||||||
{
|
{
|
||||||
GST_WARNING_OBJECT (src, "can't setup streaming from sdp");
|
GST_WARNING_OBJECT (src, "can't setup streaming from sdp");
|
||||||
|
GST_RTSP_STATE_UNLOCK (src);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5452,7 +5455,6 @@ close:
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
create_request_failed:
|
create_request_failed:
|
||||||
{
|
{
|
||||||
GST_RTSP_STATE_UNLOCK (src);
|
|
||||||
GST_ELEMENT_ERROR (src, LIBRARY, INIT, (NULL),
|
GST_ELEMENT_ERROR (src, LIBRARY, INIT, (NULL),
|
||||||
("Could not create request."));
|
("Could not create request."));
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
@ -5460,7 +5462,6 @@ create_request_failed:
|
||||||
}
|
}
|
||||||
send_error:
|
send_error:
|
||||||
{
|
{
|
||||||
GST_RTSP_STATE_UNLOCK (src);
|
|
||||||
gst_rtsp_message_unset (&request);
|
gst_rtsp_message_unset (&request);
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, WRITE, (NULL),
|
GST_ELEMENT_ERROR (src, RESOURCE, WRITE, (NULL),
|
||||||
("Could not send message."));
|
("Could not send message."));
|
||||||
|
|
Loading…
Reference in a new issue