Revision 0b1d291a libavformat/asfdec.c

View differences:

libavformat/asfdec.c
398 398
    ByteIOContext *pb = s->pb;
399 399
    AVStream *st;
400 400
    ASFStream *asf_st;
401
    int size, i;
401
    int i;
402 402
    int64_t gsize;
403 403

  
404 404
    ff_get_guid(pb, &g);
......
559 559
                get_le32(pb);
560 560
                get_le32(pb);
561 561
                get_byte(pb);
562
                size = get_le16(pb); /* size */
562
                get_le16(pb);        /* size */
563 563
                sizeX= get_le32(pb); /* size */
564 564
                st->codec->width = get_le32(pb);
565 565
                st->codec->height = get_le32(pb);
......
569 569
                tag1 = get_le32(pb);
570 570
                url_fskip(pb, 20);
571 571
//                av_log(s, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX);
572
                size= sizeX;
573
                if (size > 40) {
574
                    st->codec->extradata_size = size - 40;
572
                if (sizeX > 40) {
573
                    st->codec->extradata_size = sizeX - 40;
575 574
                    st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
576 575
                    get_buffer(pb, st->codec->extradata, st->codec->extradata_size);
577 576
                }

Also available in: Unified diff