mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
glshadervariables: also trim \r as well as \n
This commit is contained in:
parent
00506bf183
commit
97607a0d50
1 changed files with 4 additions and 4 deletions
|
@ -184,7 +184,7 @@ gst_gl_shadervariables_parse (GstGLShader * shader, char *variables,
|
|||
return 0;
|
||||
|
||||
p0 = variables;
|
||||
trimright (p0, " \t\n");
|
||||
trimright (p0, " \t\r\n");
|
||||
lim = variables + strlen (variables);
|
||||
e = strchr (p0, ';');
|
||||
while (p0 < lim) {
|
||||
|
@ -201,13 +201,13 @@ gst_gl_shadervariables_parse (GstGLShader * shader, char *variables,
|
|||
e[1] = e1;
|
||||
|
||||
trimright (p, " \t");
|
||||
trimleft (p, " \t\n");
|
||||
trimleft (p, " \t\r\n");
|
||||
|
||||
t = strtok_r (p, " \t", &saveptr);
|
||||
if (!t)
|
||||
goto parse_error;
|
||||
trimleft (t, " \t");
|
||||
trimright (t, " \t\n");
|
||||
trimright (t, " \t\r\n");
|
||||
|
||||
if (t[0]) {
|
||||
|
||||
|
@ -318,7 +318,7 @@ parse_error:
|
|||
t = p = p0;
|
||||
} else {
|
||||
e[1] = 0;
|
||||
trimleft (p0, " \t\n");
|
||||
trimleft (p0, " \t\r\n");
|
||||
GST_ERROR ("\n%s", p0);
|
||||
e[1] = e1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue