Revision b7effd4e libavformat/4xm.c

View differences:

libavformat/4xm.c
54 54
#define strk_SIZE 0x28
55 55

  
56 56
#define GET_LIST_HEADER() \
57
    fourcc_tag = get_le32(pb); \
58
    size = get_le32(pb); \
57
    fourcc_tag = avio_rl32(pb); \
58
    size = avio_rl32(pb); \
59 59
    if (fourcc_tag != LIST_TAG) \
60 60
        return AVERROR_INVALIDDATA; \
61
    fourcc_tag = get_le32(pb);
61
    fourcc_tag = avio_rl32(pb);
62 62

  
63 63
typedef struct AudioTrack {
64 64
    int sample_rate;
......
118 118
    header = av_malloc(header_size);
119 119
    if (!header)
120 120
        return AVERROR(ENOMEM);
121
    if (get_buffer(pb, header, header_size) != header_size){
121
    if (avio_read(pb, header, header_size) != header_size){
122 122
        av_free(header);
123 123
        return AVERROR(EIO);
124 124
    }
......
255 255

  
256 256
    while (!packet_read) {
257 257

  
258
        if ((ret = get_buffer(s->pb, header, 8)) < 0)
258
        if ((ret = avio_read(s->pb, header, 8)) < 0)
259 259
            return ret;
260 260
        fourcc_tag = AV_RL32(&header[0]);
261 261
        size = AV_RL32(&header[4]);
......
268 268
            fourxm->video_pts ++;
269 269

  
270 270
            /* skip the LIST-* tag and move on to the next fourcc */
271
            get_le32(pb);
271
            avio_rl32(pb);
272 272
            break;
273 273

  
274 274
        case ifrm_TAG:
......
285 285
            pkt->pts = fourxm->video_pts;
286 286
            pkt->pos = url_ftell(s->pb);
287 287
            memcpy(pkt->data, header, 8);
288
            ret = get_buffer(s->pb, &pkt->data[8], size);
288
            ret = avio_read(s->pb, &pkt->data[8], size);
289 289

  
290 290
            if (ret < 0){
291 291
                av_free_packet(pkt);
......
294 294
            break;
295 295

  
296 296
        case snd__TAG:
297
            track_number = get_le32(pb);
298
            out_size= get_le32(pb);
297
            track_number = avio_rl32(pb);
298
            out_size= avio_rl32(pb);
299 299
            size-=8;
300 300

  
301 301
            if (track_number < fourxm->track_count && fourxm->tracks[track_number].channels>0) {

Also available in: Unified diff