summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-03-03 11:17:50 +0100
committerMartin Storsjö <martin@martin.st>2013-03-07 15:16:36 +0200
commitefa7f4202088c70caba11d7834641bc6eaf41830 (patch)
tree7ef0beba253b642affcc69f634f192fdc7c12428 /libavcodec
parent12c5c1d3e3906e18a96ec380605d2f1504fc3d3b (diff)
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dvdsubdec.c3
-rw-r--r--libavcodec/utils.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 7afdd27b18..ae16f05e4c 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -23,6 +23,7 @@
#include "dsputil.h"
#include "libavutil/colorspace.h"
#include "libavutil/imgutils.h"
+#include "libavutil/avstring.h"
//#define DEBUG
@@ -522,7 +523,7 @@ static int dvdsub_init(AVCodecContext *avctx)
ctx->has_palette = 1;
for (i = 0; i < 16; i++) {
ctx->palette[i] = strtoul(p, &p, 16);
- while (*p == ',' || isspace(*p))
+ while (*p == ',' || av_isspace(*p))
p++;
}
} else if (!strncmp("size:", cur, 5)) {
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b2fdd32458..2a78f7fc0e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2105,10 +2105,10 @@ int avpriv_unlock_avformat(void)
unsigned int avpriv_toupper4(unsigned int x)
{
- return toupper(x & 0xFF)
- + (toupper((x >> 8) & 0xFF) << 8)
- + (toupper((x >> 16) & 0xFF) << 16)
- + (toupper((x >> 24) & 0xFF) << 24);
+ return av_toupper(x & 0xFF) +
+ (av_toupper((x >> 8) & 0xFF) << 8) +
+ (av_toupper((x >> 16) & 0xFF) << 16) +
+ (av_toupper((x >> 24) & 0xFF) << 24);
}
#if !HAVE_THREADS