From 3375a6a597ee2adb01e043d66fa4d4b8332a5c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Petten=C3=B2?= Date: Mon, 12 May 2008 01:17:00 +0000 Subject: [PATCH] =?UTF-8?q?Use=20strcasecmp()=20instead=20of=20re-inventin?= =?UTF-8?q?g=20it.=20Patch=20by=20Diego=20'Flameeyes'=20Petten=C3=B2=20fla?= =?UTF-8?q?meeyesATgmailPOINTcom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 13132 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/img2.c | 8 +++----- 1 file 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 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++; }