summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dvdsubdec.c3
-rw-r--r--libavcodec/realtextdec.c4
-rw-r--r--libavcodec/samidec.c10
-rw-r--r--libavcodec/utils.c8
-rw-r--r--libavcodec/xbmdec.c5
5 files changed, 16 insertions, 14 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index a5c90cd..cb268b8 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -24,6 +24,7 @@
#include "libavutil/colorspace.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
+#include "libavutil/avstring.h"
//#define DEBUG
@@ -523,7 +524,7 @@ static void parse_palette(DVDSubContext *ctx, char *p)
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++;
}
}
diff --git a/libavcodec/realtextdec.c b/libavcodec/realtextdec.c
index 102e0d9..4578897 100644
--- a/libavcodec/realtextdec.c
+++ b/libavcodec/realtextdec.c
@@ -35,11 +35,11 @@ static int rt_event_to_ass(AVBPrint *buf, const char *p)
while (*p) {
if (*p != '<') {
- if (!isspace(*p))
+ if (!av_isspace(*p))
av_bprint_chars(buf, *p, 1);
else if (!prev_chr_is_space)
av_bprint_chars(buf, ' ', 1);
- prev_chr_is_space = isspace(*p);
+ prev_chr_is_space = av_isspace(*p);
} else {
const char *end = strchr(p, '>');
if (!end)
diff --git a/libavcodec/samidec.c b/libavcodec/samidec.c
index c04b8a3..39ac608 100644
--- a/libavcodec/samidec.c
+++ b/libavcodec/samidec.c
@@ -52,7 +52,7 @@ static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
p = av_stristr(p, "<P");
if (!p)
break;
- if (p[2] != '>' && !isspace(p[2])) { // avoid confusion with tags such as <PRE>
+ if (p[2] != '>' && !av_isspace(p[2])) { // avoid confusion with tags such as <PRE>
p++;
continue;
}
@@ -70,7 +70,7 @@ static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
}
/* if empty event -> skip subtitle */
- while (isspace(*p))
+ while (av_isspace(*p))
p++;
if (!strncmp(p, "&nbsp;", 6)) {
ret = -1;
@@ -80,7 +80,7 @@ static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
/* extract the text, stripping most of the tags */
while (*p) {
if (*p == '<') {
- if (!av_strncasecmp(p, "<P", 2) && (p[2] == '>' || isspace(p[2])))
+ if (!av_strncasecmp(p, "<P", 2) && (p[2] == '>' || av_isspace(p[2])))
break;
if (!av_strncasecmp(p, "<BR", 3))
av_bprintf(dst, "\\N");
@@ -92,11 +92,11 @@ static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
if (*p == '>')
p++;
}
- if (!isspace(*p))
+ if (!av_isspace(*p))
av_bprint_chars(dst, *p, 1);
else if (!prev_chr_is_space)
av_bprint_chars(dst, ' ', 1);
- prev_chr_is_space = isspace(*p);
+ prev_chr_is_space = av_isspace(*p);
p++;
}
}
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d680f5a..0cf6091 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2777,10 +2777,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
diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c
index 2a41836..8632db7 100644
--- a/libavcodec/xbmdec.c
+++ b/libavcodec/xbmdec.c
@@ -23,6 +23,7 @@
#include "avcodec.h"
#include "internal.h"
#include "mathops.h"
+#include "libavutil/avstring.h"
static av_cold int xbm_decode_init(AVCodecContext *avctx)
{
@@ -94,10 +95,10 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
uint8_t val;
ptr += strcspn(ptr, "x") + 1;
- if (ptr < end && isxdigit(*ptr)) {
+ if (ptr < end && av_isxdigit(*ptr)) {
val = convert(*ptr);
ptr++;
- if (isxdigit(*ptr))
+ if (av_isxdigit(*ptr))
val = (val << 4) + convert(*ptr);
*dst++ = ff_reverse[val];
} else {
OpenPOWER on IntegriCloud