# HG changeset patch # User cehoyos # Date 1274210200 0 # Node ID f9eb8adfdb9e0a3e628402ade32c81101cb29b36 # Parent 86f5c95d5ca6caccffed345644128938817c159c Factorize some code into the new function ff_toupper4(). Patch by Francesco Lavra, francescolavra interfree it diff -r 86f5c95d5ca6 -r f9eb8adfdb9e utils.c --- a/utils.c Tue May 18 17:28:07 2010 +0000 +++ b/utils.c Tue May 18 19:16:40 2010 +0000 @@ -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 @@ 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;