summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-01-08 11:10:06 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-01-10 18:19:31 +0100
commitd3e435164b0d86cf37290be6bbd22610342f936d (patch)
treeebffe8f8344965b936c4779179885813a6fd9815 /ffprobe.c
parent2169f971ad9b582cc3f1e6a1430aad44d64495d3 (diff)
ffprobe: make upcase_string() ignore non-ASCII characters
This is required as some section names may contain non-ASCII characters (e.g. '_').
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffprobe.c b/ffprobe.c
index bdc3814a55..e16c8bf399 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -417,7 +417,11 @@ static inline char *upcase_string(char *dst, size_t dst_size, const char *src)
{
int i;
for (i = 0; src[i] && i < dst_size-1; i++)
- dst[i] = src[i]-32;
+ if (src[i] >= 'a' && src[i] <= 'z') {
+ dst[i] = src[i]-32;
+ } else {
+ dst[i] = src[i];
+ }
dst[i] = 0;
return dst;
}