diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-11-02 20:17:25 +0100 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-11-03 19:25:26 +0100 |
commit | 96949dafcca87f65902bd77a0bc56007d9cead70 (patch) | |
tree | e394623e56efc86b70d3e7fbdefc2555457b3aa3 /libavformat/img2.c | |
parent | 475fb67d0b391ad1e8e3e8e3d65d7e6892e17e7a (diff) | |
download | ffmpeg-96949dafcca87f65902bd77a0bc56007d9cead70.tar.gz |
Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r-- | libavformat/img2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index 7b89a9c980..444a6dfd7a 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -29,7 +29,6 @@ #include "avformat.h" #include "avio_internal.h" #include "internal.h" -#include <strings.h> typedef struct { const AVClass *class; /**< Class for private options. */ @@ -125,7 +124,7 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str) str++; while (tags->id) { - if (!strcasecmp(str, tags->str)) + if (!av_strcasecmp(str, tags->str)) return tags->id; tags++; @@ -281,7 +280,7 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap) st->codec->codec_id = s1->audio_codec_id; }else{ const char *str= strrchr(s->path, '.'); - s->split_planes = str && !strcasecmp(str + 1, "y"); + s->split_planes = str && !av_strcasecmp(str + 1, "y"); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = av_str2id(img_tags, s->path); } @@ -377,7 +376,7 @@ static int write_header(AVFormatContext *s) img->is_pipe = 1; str = strrchr(img->path, '.'); - img->split_planes = str && !strcasecmp(str + 1, "y"); + img->split_planes = str && !av_strcasecmp(str + 1, "y"); return 0; } |