summaryrefslogtreecommitdiff
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorDiego Pettenò <flameeyes@gmail.com>2008-05-12 01:17:00 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2008-05-12 01:17:00 +0000
commit3375a6a597ee2adb01e043d66fa4d4b8332a5c80 (patch)
treeb67006ebc9bdfa787549901b06109f1e99f9f941 /libavformat/img2.c
parent5da1ab1ae14c9b01015eb174820cdb32cad96d54 (diff)
Use strcasecmp() instead of re-inventing it.
Patch by Diego 'Flameeyes' Pettenò flameeyesATgmailPOINTcom Originally committed as revision 13132 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 0523bc7d81..022c6a28c7 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -22,6 +22,7 @@
#include "libavutil/avstring.h"
#include "avformat.h"
+#include <strings.h>
typedef struct {
int img_first;
@@ -102,11 +103,8 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
str++;
while (tags->id) {
- int i;
- for(i=0; toupper(tags->str[i]) == toupper(str[i]); i++){
- if(tags->str[i]==0 && str[i]==0)
- return tags->id;
- }
+ if (!strcasecmp(str, tags->str))
+ return tags->id;
tags++;
}