summaryrefslogtreecommitdiffstats
path: root/libavcodec/samidec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-03-03 11:17:50 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-03-03 21:44:10 +0100
commit88d55b827d5ecac94c9ec399d219cc02b46ed694 (patch)
tree6aa644bd0328757eae325c5ba61df169d75cfa6e /libavcodec/samidec.c
parent2cffe38df3df8ee1ec0fea0b2a2d3fed6e75da0d (diff)
downloadffmpeg-streaming-88d55b827d5ecac94c9ec399d219cc02b46ed694.zip
ffmpeg-streaming-88d55b827d5ecac94c9ec399d219cc02b46ed694.tar.gz
Remove incorrect use of ctype.h functions.
As far as I can tell the code should not change behaviour depending on locale in any of these places. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/samidec.c')
-rw-r--r--libavcodec/samidec.c10
1 files changed, 5 insertions, 5 deletions
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++;
}
}
OpenPOWER on IntegriCloud