Revision b7effd4e libavformat/vc1test.c

View differences:

libavformat/vc1test.c
49 49
    int frames;
50 50
    uint32_t fps;
51 51

  
52
    frames = get_le24(pb);
53
    if(get_byte(pb) != 0xC5 || get_le32(pb) != 4)
52
    frames = avio_rl24(pb);
53
    if(avio_r8(pb) != 0xC5 || avio_rl32(pb) != 4)
54 54
        return -1;
55 55

  
56 56
    /* init video codec */
......
63 63

  
64 64
    st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
65 65
    st->codec->extradata_size = VC1_EXTRADATA_SIZE;
66
    get_buffer(pb, st->codec->extradata, VC1_EXTRADATA_SIZE);
67
    st->codec->height = get_le32(pb);
68
    st->codec->width = get_le32(pb);
69
    if(get_le32(pb) != 0xC)
66
    avio_read(pb, st->codec->extradata, VC1_EXTRADATA_SIZE);
67
    st->codec->height = avio_rl32(pb);
68
    st->codec->width = avio_rl32(pb);
69
    if(avio_rl32(pb) != 0xC)
70 70
        return -1;
71 71
    url_fskip(pb, 8);
72
    fps = get_le32(pb);
72
    fps = avio_rl32(pb);
73 73
    if(fps == 0xFFFFFFFF)
74 74
        av_set_pts_info(st, 32, 1, 1000);
75 75
    else{
......
95 95
    if(url_feof(pb))
96 96
        return AVERROR(EIO);
97 97

  
98
    frame_size = get_le24(pb);
99
    if(get_byte(pb) & 0x80)
98
    frame_size = avio_rl24(pb);
99
    if(avio_r8(pb) & 0x80)
100 100
        keyframe = 1;
101
    pts = get_le32(pb);
101
    pts = avio_rl32(pb);
102 102
    if(av_get_packet(pb, pkt, frame_size) < 0)
103 103
        return AVERROR(EIO);
104 104
    if(s->streams[0]->time_base.den == 1000)

Also available in: Unified diff