diff options
author | Francesco Lavra <francescolavra@interfree.it> | 2010-05-18 19:16:40 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-05-18 19:16:40 +0000 |
commit | 603a5f04b2da0622faab796307d7208ecde80603 (patch) | |
tree | 7995eda41969870c0a1fb0109bd18de4633340b0 /libavformat | |
parent | b74f67eb17b3dae49cb42affa07b5c41ef09160e (diff) | |
download | ffmpeg-603a5f04b2da0622faab796307d7208ecde80603.tar.gz |
Factorize some code into the new function ff_toupper4().
Patch by Francesco Lavra, francescolavra interfree it
Originally committed as revision 23158 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 1da1313e6e..73cecc9f0e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -20,6 +20,7 @@ */ #include "avformat.h" #include "internal.h" +#include "libavcodec/internal.h" #include "libavcodec/opt.h" #include "metadata.h" #include "libavutil/avstring.h" @@ -2041,10 +2042,7 @@ enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag) return tags[i].id; } for(i=0; tags[i].id != CODEC_ID_NONE; i++) { - if( toupper((tag >> 0)&0xFF) == toupper((tags[i].tag >> 0)&0xFF) - && toupper((tag >> 8)&0xFF) == toupper((tags[i].tag >> 8)&0xFF) - && toupper((tag >>16)&0xFF) == toupper((tags[i].tag >>16)&0xFF) - && toupper((tag >>24)&0xFF) == toupper((tags[i].tag >>24)&0xFF)) + if (ff_toupper4(tag) == ff_toupper4(tags[i].tag)) return tags[i].id; } return CODEC_ID_NONE; |