mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
info: parse debug levels > 9
This commit is contained in:
parent
d55893fb96
commit
f599019a99
1 changed files with 9 additions and 3 deletions
|
@ -1717,9 +1717,15 @@ parse_debug_level (gchar * str, GstDebugLevel * level)
|
|||
/* works in place */
|
||||
g_strstrip (str);
|
||||
|
||||
if (str[0] != '\0' && str[1] == '\0'
|
||||
&& str[0] >= '0' && str[0] < '0' + GST_LEVEL_COUNT) {
|
||||
*level = (GstDebugLevel) (str[0] - '0');
|
||||
if (g_ascii_isdigit (str[0])) {
|
||||
unsigned long l;
|
||||
char *endptr;
|
||||
l = strtoul (str, &endptr, 10);
|
||||
if (endptr > str && endptr[0] == 0) {
|
||||
*level = (GstDebugLevel) l;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
} else if (strcmp (str, "ERROR") == 0) {
|
||||
*level = GST_LEVEL_ERROR;
|
||||
} else if (strncmp (str, "WARN", 4) == 0) {
|
||||
|
|
Loading…
Reference in a new issue