Revision b7effd4e libavformat/westwood.c

View differences:

libavformat/westwood.c
130 130
    AVStream *st;
131 131
    unsigned char header[AUD_HEADER_SIZE];
132 132

  
133
    if (get_buffer(pb, header, AUD_HEADER_SIZE) != AUD_HEADER_SIZE)
133
    if (avio_read(pb, header, AUD_HEADER_SIZE) != AUD_HEADER_SIZE)
134 134
        return AVERROR(EIO);
135 135
    wsaud->audio_samplerate = AV_RL16(&header[0]);
136 136
    if (header[11] == 99)
......
173 173
    unsigned int chunk_size;
174 174
    int ret = 0;
175 175

  
176
    if (get_buffer(pb, preamble, AUD_CHUNK_PREAMBLE_SIZE) !=
176
    if (avio_read(pb, preamble, AUD_CHUNK_PREAMBLE_SIZE) !=
177 177
        AUD_CHUNK_PREAMBLE_SIZE)
178 178
        return AVERROR(EIO);
179 179

  
......
237 237
    st->codec->extradata_size = VQA_HEADER_SIZE;
238 238
    st->codec->extradata = av_mallocz(VQA_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
239 239
    header = (unsigned char *)st->codec->extradata;
240
    if (get_buffer(pb, st->codec->extradata, VQA_HEADER_SIZE) !=
240
    if (avio_read(pb, st->codec->extradata, VQA_HEADER_SIZE) !=
241 241
        VQA_HEADER_SIZE) {
242 242
        av_free(st->codec->extradata);
243 243
        return AVERROR(EIO);
......
277 277
    /* there are 0 or more chunks before the FINF chunk; iterate until
278 278
     * FINF has been skipped and the file will be ready to be demuxed */
279 279
    do {
280
        if (get_buffer(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
280
        if (avio_read(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
281 281
            av_free(st->codec->extradata);
282 282
            return AVERROR(EIO);
283 283
        }
......
320 320
    unsigned int chunk_size;
321 321
    int skip_byte;
322 322

  
323
    while (get_buffer(pb, preamble, VQA_PREAMBLE_SIZE) == VQA_PREAMBLE_SIZE) {
323
    while (avio_read(pb, preamble, VQA_PREAMBLE_SIZE) == VQA_PREAMBLE_SIZE) {
324 324
        chunk_type = AV_RB32(&preamble[0]);
325 325
        chunk_size = AV_RB32(&preamble[4]);
326 326
        skip_byte = chunk_size & 0x01;
......
329 329

  
330 330
            if (av_new_packet(pkt, chunk_size))
331 331
                return AVERROR(EIO);
332
            ret = get_buffer(pb, pkt->data, chunk_size);
332
            ret = avio_read(pb, pkt->data, chunk_size);
333 333
            if (ret != chunk_size) {
334 334
                av_free_packet(pkt);
335 335
                return AVERROR(EIO);

Also available in: Unified diff