Use the avstring.h locale-independent character type functions

Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Reimar Döffinger
2013-03-03 11:17:50 +01:00
committed by Martin Storsjö
parent 12c5c1d3e3
commit efa7f42020
23 changed files with 47 additions and 52 deletions

View File

@@ -3050,11 +3050,11 @@ int av_get_frame_filename(char *buf, int buf_size,
if (c == '%') {
do {
nd = 0;
while (isdigit(*p)) {
while (av_isdigit(*p)) {
nd = nd * 10 + *p++ - '0';
}
c = *p++;
} while (isdigit(c));
} while (av_isdigit(c));
switch(c) {
case '%':
@@ -3255,7 +3255,7 @@ int ff_hex_to_data(uint8_t *data, const char *p)
p += strspn(p, SPACE_CHARS);
if (*p == '\0')
break;
c = toupper((unsigned char) *p++);
c = av_toupper((unsigned char) *p++);
if (c >= '0' && c <= '9')
c = c - '0';
else if (c >= 'A' && c <= 'F')
@@ -3365,7 +3365,7 @@ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
int key_len, dest_len = 0;
/* Skip whitespace and potential commas. */
while (*ptr && (isspace(*ptr) || *ptr == ','))
while (*ptr && (av_isspace(*ptr) || *ptr == ','))
ptr++;
if (!*ptr)
break;
@@ -3398,7 +3398,7 @@ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
if (*ptr == '\"')
ptr++;
} else {
for (; *ptr && !(isspace(*ptr) || *ptr == ','); ptr++)
for (; *ptr && !(av_isspace(*ptr) || *ptr == ','); ptr++)
if (dest && dest < dest_end)
*dest++ = *ptr;
}