try exact match before case insensitive match in codec_get_id
Originally committed as revision 9808 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
60ff1c4481
commit
41415d2856
@ -1671,13 +1671,17 @@ unsigned int codec_get_tag(const AVCodecTag *tags, int id)
|
|||||||
|
|
||||||
enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag)
|
enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag)
|
||||||
{
|
{
|
||||||
while (tags->id != CODEC_ID_NONE) {
|
int i;
|
||||||
if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF)
|
for(i=0; tags[i].id != CODEC_ID_NONE;i++) {
|
||||||
&& toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF)
|
if(tag == tags[i].tag)
|
||||||
&& toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF)
|
return tags[i].id;
|
||||||
&& toupper((tag >>24)&0xFF) == toupper((tags->tag >>24)&0xFF))
|
}
|
||||||
return tags->id;
|
for(i=0; tags[i].id != CODEC_ID_NONE; i++) {
|
||||||
tags++;
|
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))
|
||||||
|
return tags[i].id;
|
||||||
}
|
}
|
||||||
return CODEC_ID_NONE;
|
return CODEC_ID_NONE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user