Revision 14546184

View differences:

libavformat/oma.c
78 78
    if (ret != 10)
79 79
        return -1;
80 80

  
81
    if(!memcmp(buf, "ea3", 3)) {
81 82
    ea3_taglen = ((buf[6] & 0x7f) << 21) | ((buf[7] & 0x7f) << 14) | ((buf[8] & 0x7f) << 7) | (buf[9] & 0x7f);
82 83

  
83 84
    EA3_pos = ea3_taglen + 10;
......
88 89
    ret = get_buffer(s->pb, buf, EA3_HEADER_SIZE);
89 90
    if (ret != EA3_HEADER_SIZE)
90 91
        return -1;
92
    } else {
93
        ret = get_buffer(s->pb, buf + 10, EA3_HEADER_SIZE - 10);
94
        EA3_pos = 0;
95
    }
91 96

  
92 97
    if (memcmp(buf, ((const uint8_t[]){'E', 'A', '3'}),3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) {
93 98
        av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n");
......
177 182

  
178 183
static int oma_read_probe(AVProbeData *p)
179 184
{
180
    if (!memcmp(p->buf, ((const uint8_t[]){'e', 'a', '3', 3, 0}),5))
185
    if (!memcmp(p->buf, ((const uint8_t[]){'e', 'a', '3', 3, 0}), 5) ||
186
        (!memcmp(p->buf, "EA3", 3) &&
187
         !p->buf[4] && p->buf[5] == EA3_HEADER_SIZE))
181 188
        return AVPROBE_SCORE_MAX;
182 189
    else
183 190
        return 0;

Also available in: Unified diff