mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 22:21:13 +00:00
Handle escaped spaces in structure string, so that gst_parse_launch() can deal with spaces in filtered link caps (fix...
Original commit message from CVS: Handle escaped spaces in structure string, so that gst_parse_launch() can deal with spaces in filtered link caps (fixes #164479)
This commit is contained in:
parent
f7af07c1b8
commit
62cf7cc54d
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2005-03-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/gststructure.c: (gst_structure_parse_field),
|
||||||
|
(gst_structure_from_string):
|
||||||
|
Handle escaped spaces in structure string, so that
|
||||||
|
gst_parse_launch() can deal with spaces in filtered
|
||||||
|
link caps (fixes #164479).
|
||||||
|
|
||||||
2005-03-20 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
2005-03-20 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
* gst/gstbuffer.h:
|
* gst/gstbuffer.h:
|
||||||
|
|
|
@ -1352,14 +1352,14 @@ gst_structure_parse_field (gchar * str,
|
||||||
|
|
||||||
s = str;
|
s = str;
|
||||||
|
|
||||||
while (g_ascii_isspace (*s))
|
while (g_ascii_isspace (*s) || (s[0] == '\\' && g_ascii_isspace (s[1])))
|
||||||
s++;
|
s++;
|
||||||
name = s;
|
name = s;
|
||||||
if (!gst_structure_parse_simple_string (s, &name_end))
|
if (!gst_structure_parse_simple_string (s, &name_end))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
s = name_end;
|
s = name_end;
|
||||||
while (g_ascii_isspace (*s))
|
while (g_ascii_isspace (*s) || (s[0] == '\\' && g_ascii_isspace (s[1])))
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
if (*s != '=')
|
if (*s != '=')
|
||||||
|
@ -1492,7 +1492,7 @@ gst_structure_from_string (const gchar * string, gchar ** end)
|
||||||
if (!gst_structure_parse_string (r, &w, &r))
|
if (!gst_structure_parse_string (r, &w, &r))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
while (g_ascii_isspace (*r))
|
while (g_ascii_isspace (*r) || (r[0] == '\\' && g_ascii_isspace (r[1])))
|
||||||
r++;
|
r++;
|
||||||
if (*r != 0 && *r != ';' && *r != ',')
|
if (*r != 0 && *r != ';' && *r != ',')
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -1506,14 +1506,16 @@ gst_structure_from_string (const gchar * string, gchar ** end)
|
||||||
if (*r != ',')
|
if (*r != ',')
|
||||||
goto error;
|
goto error;
|
||||||
r++;
|
r++;
|
||||||
while (*r && g_ascii_isspace (*r))
|
while (*r && (g_ascii_isspace (*r) || (r[0] == '\\'
|
||||||
|
&& g_ascii_isspace (r[1]))))
|
||||||
r++;
|
r++;
|
||||||
|
|
||||||
memset (&field, 0, sizeof (field));
|
memset (&field, 0, sizeof (field));
|
||||||
if (!gst_structure_parse_field (r, &r, &field))
|
if (!gst_structure_parse_field (r, &r, &field))
|
||||||
goto error;
|
goto error;
|
||||||
gst_structure_set_field (structure, &field);
|
gst_structure_set_field (structure, &field);
|
||||||
while (*r && g_ascii_isspace (*r))
|
while (*r && (g_ascii_isspace (*r) || (r[0] == '\\'
|
||||||
|
&& g_ascii_isspace (r[1]))))
|
||||||
r++;
|
r++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue