Revision 41415d28

View differences:

libavformat/utils.c
1671 1671

  
1672 1672
enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag)
1673 1673
{
1674
    while (tags->id != CODEC_ID_NONE) {
1675
        if(   toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF)
1676
           && toupper((tag >> 8)&0xFF) == toupper((tags->tag >> 8)&0xFF)
1677
           && toupper((tag >>16)&0xFF) == toupper((tags->tag >>16)&0xFF)
1678
           && toupper((tag >>24)&0xFF) == toupper((tags->tag >>24)&0xFF))
1679
            return tags->id;
1680
        tags++;
1674
    int i;
1675
    for(i=0; tags[i].id != CODEC_ID_NONE;i++) {
1676
        if(tag == tags[i].tag)
1677
            return tags[i].id;
1678
    }
1679
    for(i=0; tags[i].id != CODEC_ID_NONE; i++) {
1680
        if(   toupper((tag >> 0)&0xFF) == toupper((tags[i].tag >> 0)&0xFF)
1681
           && toupper((tag >> 8)&0xFF) == toupper((tags[i].tag >> 8)&0xFF)
1682
           && toupper((tag >>16)&0xFF) == toupper((tags[i].tag >>16)&0xFF)
1683
           && toupper((tag >>24)&0xFF) == toupper((tags[i].tag >>24)&0xFF))
1684
            return tags[i].id;
1681 1685
    }
1682 1686
    return CODEC_ID_NONE;
1683 1687
}

Also available in: Unified diff