comparison img2.c @ 3288:b8f57813338a libavformat

Use strcasecmp() instead of re-inventing it. Patch by Diego 'Flameeyes' Petten flameeyesATgmailPOINTcom
author benoit
date Mon, 12 May 2008 01:17:00 +0000
parents 6f61c3b36632
children 811c78fac294
comparison
equal deleted inserted replaced
3287:8570df039c75 3288:b8f57813338a
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */ 21 */
22 22
23 #include "libavutil/avstring.h" 23 #include "libavutil/avstring.h"
24 #include "avformat.h" 24 #include "avformat.h"
25 #include <strings.h>
25 26
26 typedef struct { 27 typedef struct {
27 int img_first; 28 int img_first;
28 int img_last; 29 int img_last;
29 int img_number; 30 int img_number;
100 str= strrchr(str, '.'); 101 str= strrchr(str, '.');
101 if(!str) return CODEC_ID_NONE; 102 if(!str) return CODEC_ID_NONE;
102 str++; 103 str++;
103 104
104 while (tags->id) { 105 while (tags->id) {
105 int i; 106 if (!strcasecmp(str, tags->str))
106 for(i=0; toupper(tags->str[i]) == toupper(str[i]); i++){ 107 return tags->id;
107 if(tags->str[i]==0 && str[i]==0)
108 return tags->id;
109 }
110 108
111 tags++; 109 tags++;
112 } 110 }
113 return CODEC_ID_NONE; 111 return CODEC_ID_NONE;
114 } 112 }