[FFmpeg-cvslog] r13132 - trunk/libavformat/img2.c

benoit subversion
Mon May 12 03:17:01 CEST 2008


Author: benoit
Date: Mon May 12 03:17:00 2008
New Revision: 13132

Log:
Use strcasecmp() instead of re-inventing it.
Patch by Diego 'Flameeyes' Petten? flameeyesATgmailPOINTcom


Modified:
   trunk/libavformat/img2.c

Modified: trunk/libavformat/img2.c
==============================================================================
--- trunk/libavformat/img2.c	(original)
+++ trunk/libavformat/img2.c	Mon May 12 03:17:00 2008
@@ -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 IdSt
     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++;
     }




More information about the ffmpeg-cvslog mailing list