Revision b5b9ff2a

View differences:

libavformat/rmdec.c
440 440
            state= (state<<8) + get_byte(pb);
441 441

  
442 442
            if(state == MKBETAG('I', 'N', 'D', 'X')){
443
                len = get_be16(pb) - 6;
443
                int n_pkts, expected_len;
444
                len = get_be32(pb);
445
                url_fskip(pb, 2);
446
                n_pkts = get_be32(pb);
447
                expected_len = 20 + n_pkts * 14;
448
                if (len == 20)
449
                    /* some files don't add index entries to chunk size... */
450
                    len = expected_len;
451
                else if (len != expected_len)
452
                    av_log(s, AV_LOG_WARNING,
453
                           "Index size %d (%d pkts) is wrong, should be %d.\n",
454
                           len, n_pkts, expected_len);
455
                len -= 14; // we already read part of the index header
444 456
                if(len<0)
445 457
                    continue;
446 458
                goto skip;

Also available in: Unified diff