Revision b7effd4e libavformat/lxfdec.c

View differences:

libavformat/lxfdec.c
86 86
    uint8_t buf[LXF_IDENT_LENGTH];
87 87
    int ret;
88 88

  
89
    if ((ret = get_buffer(s->pb, buf, LXF_IDENT_LENGTH)) != LXF_IDENT_LENGTH)
89
    if ((ret = avio_read(s->pb, buf, LXF_IDENT_LENGTH)) != LXF_IDENT_LENGTH)
90 90
        return ret < 0 ? ret : AVERROR_EOF;
91 91

  
92 92
    while (memcmp(buf, LXF_IDENT, LXF_IDENT_LENGTH)) {
......
94 94
            return AVERROR_EOF;
95 95

  
96 96
        memmove(buf, &buf[1], LXF_IDENT_LENGTH-1);
97
        buf[LXF_IDENT_LENGTH-1] = get_byte(s->pb);
97
        buf[LXF_IDENT_LENGTH-1] = avio_r8(s->pb);
98 98
    }
99 99

  
100 100
    memcpy(header, LXF_IDENT, LXF_IDENT_LENGTH);
......
120 120
        return ret;
121 121

  
122 122
    //read the rest of the packet header
123
    if ((ret = get_buffer(pb, header + LXF_IDENT_LENGTH,
123
    if ((ret = avio_read(pb, header + LXF_IDENT_LENGTH,
124 124
                          LXF_PACKET_HEADER_SIZE - LXF_IDENT_LENGTH)) !=
125 125
                          LXF_PACKET_HEADER_SIZE - LXF_IDENT_LENGTH) {
126 126
        return ret < 0 ? ret : AVERROR_EOF;
......
214 214
        return AVERROR_INVALIDDATA;
215 215
    }
216 216

  
217
    if ((ret = get_buffer(pb, header_data, LXF_HEADER_DATA_SIZE)) != LXF_HEADER_DATA_SIZE)
217
    if ((ret = avio_read(pb, header_data, LXF_HEADER_DATA_SIZE)) != LXF_HEADER_DATA_SIZE)
218 218
        return ret < 0 ? ret : AVERROR_EOF;
219 219

  
220 220
    if (!(st = av_new_stream(s, 0)))
......
315 315
    //read non-20-bit audio data into lxf->temp so we can deplanarize it
316 316
    buf = ast && ast->codec->codec_id != CODEC_ID_PCM_LXF ? lxf->temp : pkt->data;
317 317

  
318
    if ((ret2 = get_buffer(pb, buf, ret)) != ret) {
318
    if ((ret2 = avio_read(pb, buf, ret)) != ret) {
319 319
        av_free_packet(pkt);
320 320
        return ret2 < 0 ? ret2 : AVERROR_EOF;
321 321
    }

Also available in: Unified diff