mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
msemediabuffer: Fix ASCII character detection
Use glib function. The previous check was checking whether a signed int was lower than its limit (which ... is always TRUE). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
This commit is contained in:
parent
efbe1e96ca
commit
b78c119a42
1 changed files with 3 additions and 9 deletions
|
@ -56,12 +56,6 @@ is_token_character (const gchar c)
|
|||
return g_ascii_isgraph (c);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_ascii (const gchar c)
|
||||
{
|
||||
return c > 0 && c <= G_MAXINT8;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_eos (const gchar c)
|
||||
{
|
||||
|
@ -135,8 +129,8 @@ quoted_string_char (const gchar ** input, gchar * value)
|
|||
g_return_val_if_fail (value != NULL, FALSE);
|
||||
|
||||
const gchar *unparsed = *input;
|
||||
char c = unparsed[0];
|
||||
if (!is_ascii (c)) {
|
||||
gchar c = unparsed[0];
|
||||
if (!g_ascii_isprint (c)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -160,7 +154,7 @@ escaped_ascii_char (const gchar ** input, gchar * value)
|
|||
}
|
||||
|
||||
gchar c = (*input)[0];
|
||||
if (!is_ascii (c)) {
|
||||
if (!g_ascii_isprint (c)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue