mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 14:02:26 +00:00
gst/rtsp/gstrtspsrc.c: Handle the case where we cannot do desribe or when the describe result does not contain a vali...
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_open): Handle the case where we cannot do desribe or when the describe result does not contain a valid SDP message.
This commit is contained in:
parent
34a8fa06f9
commit
bf8777356b
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-09-23 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_open):
|
||||||
|
Handle the case where we cannot do desribe or when the describe result
|
||||||
|
does not contain a valid SDP message.
|
||||||
|
|
||||||
2008-09-23 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-09-23 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_set_property):
|
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_set_property):
|
||||||
|
|
|
@ -3365,6 +3365,7 @@ handle_request_failed:
|
||||||
* @src: the rtsp source
|
* @src: the rtsp source
|
||||||
* @request: must point to a valid request
|
* @request: must point to a valid request
|
||||||
* @response: must point to an empty #GstRTSPMessage
|
* @response: must point to an empty #GstRTSPMessage
|
||||||
|
* @code: an optional code result
|
||||||
*
|
*
|
||||||
* send @request and retrieve the response in @response. optionally @code can be
|
* send @request and retrieve the response in @response. optionally @code can be
|
||||||
* non-NULL in which case it will contain the status code of the response.
|
* non-NULL in which case it will contain the status code of the response.
|
||||||
|
@ -4110,6 +4111,10 @@ restart:
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* it could be that the DESCRIBE method was not implemented */
|
||||||
|
if (!src->methods & GST_RTSP_DESCRIBE)
|
||||||
|
goto no_describe;
|
||||||
|
|
||||||
/* check if reply is SDP */
|
/* check if reply is SDP */
|
||||||
gst_rtsp_message_get_header (&response, GST_RTSP_HDR_CONTENT_TYPE, &respcont,
|
gst_rtsp_message_get_header (&response, GST_RTSP_HDR_CONTENT_TYPE, &respcont,
|
||||||
0);
|
0);
|
||||||
|
@ -4123,6 +4128,9 @@ restart:
|
||||||
/* get message body and parse as SDP */
|
/* get message body and parse as SDP */
|
||||||
gst_rtsp_message_get_body (&response, &data, &size);
|
gst_rtsp_message_get_body (&response, &data, &size);
|
||||||
|
|
||||||
|
if (data == NULL)
|
||||||
|
goto no_describe;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "parse SDP...");
|
GST_DEBUG_OBJECT (src, "parse SDP...");
|
||||||
gst_sdp_message_init (&sdp);
|
gst_sdp_message_init (&sdp);
|
||||||
gst_sdp_message_parse_buffer (data, size, &sdp);
|
gst_sdp_message_parse_buffer (data, size, &sdp);
|
||||||
|
@ -4214,8 +4222,15 @@ wrong_content_type:
|
||||||
("Server does not support SDP, got %s.", respcont));
|
("Server does not support SDP, got %s.", respcont));
|
||||||
goto cleanup_error;
|
goto cleanup_error;
|
||||||
}
|
}
|
||||||
|
no_describe:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (src, RESOURCE, SETTINGS, (NULL),
|
||||||
|
("Server can not provide an SDP."));
|
||||||
|
goto cleanup_error;
|
||||||
|
}
|
||||||
setup_failed:
|
setup_failed:
|
||||||
{
|
{
|
||||||
|
gst_rtspsrc_close (src);
|
||||||
/* error was posted */
|
/* error was posted */
|
||||||
goto cleanup_error;
|
goto cleanup_error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue