mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
rtspsrc: Allow mimetypes with properties as long as they're application/sdp
Some servers add properties like charset, e.g. application/sdp; charset=utf8 Ideally we should also parse the charset and do conversion of all messages, but that's for a later time.
This commit is contained in:
parent
cdb7649909
commit
0b0a042781
1 changed files with 17 additions and 1 deletions
|
@ -6792,10 +6792,26 @@ restart:
|
||||||
/* could not be set but since the request returned OK, we assume it
|
/* could not be set but since the request returned OK, we assume it
|
||||||
* was SDP, else check it. */
|
* was SDP, else check it. */
|
||||||
if (respcont) {
|
if (respcont) {
|
||||||
if (g_ascii_strcasecmp (respcont, "application/sdp") != 0)
|
const gchar *props = strchr (respcont, ';');
|
||||||
|
|
||||||
|
if (props) {
|
||||||
|
gchar *mimetype = g_strndup (respcont, props - respcont);
|
||||||
|
|
||||||
|
mimetype = g_strstrip (mimetype);
|
||||||
|
if (g_ascii_strcasecmp (mimetype, "application/sdp") != 0) {
|
||||||
|
g_free (mimetype);
|
||||||
goto wrong_content_type;
|
goto wrong_content_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Check for charset property and do conversions of all messages if
|
||||||
|
* needed. Some servers actually send that property */
|
||||||
|
|
||||||
|
g_free (mimetype);
|
||||||
|
} else if (g_ascii_strcasecmp (respcont, "application/sdp") != 0) {
|
||||||
|
goto wrong_content_type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 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 || size == 0)
|
if (data == NULL || size == 0)
|
||||||
|
|
Loading…
Reference in a new issue