mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
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
This commit is contained in:
parent
5da1ab1ae1
commit
3375a6a597
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int img_first;
|
int img_first;
|
||||||
@ -102,11 +103,8 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
|
|||||||
str++;
|
str++;
|
||||||
|
|
||||||
while (tags->id) {
|
while (tags->id) {
|
||||||
int i;
|
if (!strcasecmp(str, tags->str))
|
||||||
for(i=0; toupper(tags->str[i]) == toupper(str[i]); i++){
|
return tags->id;
|
||||||
if(tags->str[i]==0 && str[i]==0)
|
|
||||||
return tags->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
tags++;
|
tags++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user