Revision d66eff36 libavformat/id3v2.c

View differences:

libavformat/id3v2.c
74 74

  
75 75
    switch (get_byte(pb)) { /* encoding type */
76 76

  
77
    case 0:  /* ISO-8859-1 (0 - 255 maps directly into unicode) */
77
    case ID3v2_ENCODING_ISO8859:
78 78
        q = dst;
79 79
        while (taglen-- && q - dst < dstlen - 7) {
80 80
            uint8_t tmp;
......
83 83
        *q = 0;
84 84
        break;
85 85

  
86
    case 1:  /* UTF-16 with BOM */
86
    case ID3v2_ENCODING_UTF16BOM:
87 87
        taglen -= 2;
88 88
        switch (get_be16(pb)) {
89 89
        case 0xfffe:
......
96 96
        }
97 97
        // fall-through
98 98

  
99
    case 2:  /* UTF-16BE without BOM */
99
    case ID3v2_ENCODING_UTF16BE:
100 100
        q = dst;
101 101
        while (taglen > 1 && q - dst < dstlen - 7) {
102 102
            uint32_t ch;
......
108 108
        *q = 0;
109 109
        break;
110 110

  
111
    case 3:  /* UTF-8 */
111
    case ID3v2_ENCODING_UTF8:
112 112
        len = FFMIN(taglen, dstlen);
113 113
        get_buffer(pb, dst, len);
114 114
        dst[len] = 0;

Also available in: Unified diff