Revision e63a3628 libavformat/rl2.c

View differences:

libavformat/rl2.c
96 96
    int ret = 0;
97 97

  
98 98
    url_fskip(pb,4);          /* skip FORM tag */
99
    back_size = get_le32(pb); /**< get size of the background frame */
100
    signature = get_be32(pb);
101
    data_size = get_be32(pb);
102
    frame_count = get_le32(pb);
99
    back_size = avio_rl32(pb); /**< get size of the background frame */
100
    signature = avio_rb32(pb);
101
    data_size = avio_rb32(pb);
102
    frame_count = avio_rl32(pb);
103 103

  
104 104
    /* disallow back_sizes and frame_counts that may lead to overflows later */
105 105
    if(back_size > INT_MAX/2  || frame_count > INT_MAX / sizeof(uint32_t))
106 106
        return AVERROR_INVALIDDATA;
107 107

  
108
    encoding_method = get_le16(pb);
109
    sound_rate = get_le16(pb);
110
    rate = get_le16(pb);
111
    channels = get_le16(pb);
112
    def_sound_size = get_le16(pb);
108
    encoding_method = avio_rl16(pb);
109
    sound_rate = avio_rl16(pb);
110
    rate = avio_rl16(pb);
111
    channels = avio_rl16(pb);
112
    def_sound_size = avio_rl16(pb);
113 113

  
114 114
    /** setup video stream */
115 115
    st = av_new_stream(s, 0);
......
133 133
    if(!st->codec->extradata)
134 134
        return AVERROR(ENOMEM);
135 135

  
136
    if(get_buffer(pb,st->codec->extradata,st->codec->extradata_size) !=
136
    if(avio_read(pb,st->codec->extradata,st->codec->extradata_size) !=
137 137
                      st->codec->extradata_size)
138 138
        return AVERROR(EIO);
139 139

  
......
173 173

  
174 174
    /** read offset and size tables */
175 175
    for(i=0; i < frame_count;i++)
176
        chunk_size[i] = get_le32(pb);
176
        chunk_size[i] = avio_rl32(pb);
177 177
    for(i=0; i < frame_count;i++)
178
        chunk_offset[i] = get_le32(pb);
178
        chunk_offset[i] = avio_rl32(pb);
179 179
    for(i=0; i < frame_count;i++)
180
        audio_size[i] = get_le32(pb) & 0xFFFF;
180
        audio_size[i] = avio_rl32(pb) & 0xFFFF;
181 181

  
182 182
    /** build the sample index */
183 183
    for(i=0;i<frame_count;i++){

Also available in: Unified diff