mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
rtspsrc: don't add non-utf8 chars to structures
This commit is contained in:
parent
654ca56d85
commit
784b95ddbf
1 changed files with 4 additions and 0 deletions
|
@ -1042,6 +1042,10 @@ gst_rtspsrc_sdp_attributes_to_caps (GArray * attributes, GstCaps * caps)
|
||||||
if (!strcmp (key, "range"))
|
if (!strcmp (key, "range"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* string must be valid UTF8 */
|
||||||
|
if (!g_utf8_validate (attr->value, -1, NULL))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!g_str_has_prefix (key, "x-"))
|
if (!g_str_has_prefix (key, "x-"))
|
||||||
tofree = key = g_strdup_printf ("a-%s", key);
|
tofree = key = g_strdup_printf ("a-%s", key);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue