Revision 88f8805f

View differences:

libavformat/ape.c
159 159
    int total_blocks;
160 160
    int64_t pts;
161 161

  
162
    /* TODO: Skip any leading junk such as id3v2 tags */
163
    ape->junklength = 0;
162
    /* Skip any leading junk such as id3v2 tags */
163
    ape->junklength = avio_tell(pb);
164 164

  
165 165
    tag = avio_rl32(pb);
166 166
    if (tag != MKTAG('M', 'A', 'C', ' '))
......
271 271
    ape->frames[0].nblocks = ape->blocksperframe;
272 272
    ape->frames[0].skip    = 0;
273 273
    for (i = 1; i < ape->totalframes; i++) {
274
        ape->frames[i].pos      = ape->seektable[i]; //ape->frames[i-1].pos + ape->blocksperframe;
274
        ape->frames[i].pos      = ape->seektable[i] + ape->junklength; //ape->frames[i-1].pos + ape->blocksperframe;
275 275
        ape->frames[i].nblocks  = ape->blocksperframe;
276 276
        ape->frames[i - 1].size = ape->frames[i].pos - ape->frames[i - 1].pos;
277 277
        ape->frames[i].skip     = (ape->frames[i].pos - ape->frames[0].pos) & 3;

Also available in: Unified diff