Revision e63a3628 libavformat/flic.c

View differences:

libavformat/flic.c
96 96
    flic->frame_number = 0;
97 97

  
98 98
    /* load the whole header and pull out the width and height */
99
    if (get_buffer(pb, header, FLIC_HEADER_SIZE) != FLIC_HEADER_SIZE)
99
    if (avio_read(pb, header, FLIC_HEADER_SIZE) != FLIC_HEADER_SIZE)
100 100
        return AVERROR(EIO);
101 101

  
102 102
    magic_number = AV_RL16(&header[4]);
......
130 130
    memcpy(st->codec->extradata, header, FLIC_HEADER_SIZE);
131 131

  
132 132
    /* peek at the preamble to detect TFTD videos - they seem to always start with an audio chunk */
133
    if (get_buffer(pb, preamble, FLIC_PREAMBLE_SIZE) != FLIC_PREAMBLE_SIZE) {
133
    if (avio_read(pb, preamble, FLIC_PREAMBLE_SIZE) != FLIC_PREAMBLE_SIZE) {
134 134
        av_log(s, AV_LOG_ERROR, "Failed to peek at preamble\n");
135 135
        return AVERROR(EIO);
136 136
    }
......
207 207

  
208 208
    while (!packet_read) {
209 209

  
210
        if ((ret = get_buffer(pb, preamble, FLIC_PREAMBLE_SIZE)) !=
210
        if ((ret = avio_read(pb, preamble, FLIC_PREAMBLE_SIZE)) !=
211 211
            FLIC_PREAMBLE_SIZE) {
212 212
            ret = AVERROR(EIO);
213 213
            break;
......
225 225
            pkt->pts = flic->frame_number++;
226 226
            pkt->pos = url_ftell(pb);
227 227
            memcpy(pkt->data, preamble, FLIC_PREAMBLE_SIZE);
228
            ret = get_buffer(pb, pkt->data + FLIC_PREAMBLE_SIZE,
228
            ret = avio_read(pb, pkt->data + FLIC_PREAMBLE_SIZE,
229 229
                size - FLIC_PREAMBLE_SIZE);
230 230
            if (ret != size - FLIC_PREAMBLE_SIZE) {
231 231
                av_free_packet(pkt);
......
243 243

  
244 244
            pkt->stream_index = flic->audio_stream_index;
245 245
            pkt->pos = url_ftell(pb);
246
            ret = get_buffer(pb, pkt->data, size);
246
            ret = avio_read(pb, pkt->data, size);
247 247

  
248 248
            if (ret != size) {
249 249
                av_free_packet(pkt);

Also available in: Unified diff