Mercurial > libavformat.hg
changeset 6007:f9eb8adfdb9e libavformat
Factorize some code into the new function ff_toupper4().
Patch by Francesco Lavra, francescolavra interfree it
author | cehoyos |
---|---|
date | Tue, 18 May 2010 19:16:40 +0000 |
parents | 86f5c95d5ca6 |
children | 2e702728eea8 |
files | utils.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;