Revision e63a3628 libavformat/dv.c

View differences:

libavformat/dv.c
410 410
    if (!c->dv_demux)
411 411
        return -1;
412 412

  
413
    state = get_be32(s->pb);
413
    state = avio_rb32(s->pb);
414 414
    while ((state & 0xffffff7f) != 0x1f07003f) {
415 415
        if (url_feof(s->pb)) {
416 416
            av_log(s, AV_LOG_ERROR, "Cannot find DV header.\n");
......
420 420
            marker_pos = url_ftell(s->pb);
421 421
        if (state == 0xff3f0701 && url_ftell(s->pb) - marker_pos == 80) {
422 422
            url_fseek(s->pb, -163, SEEK_CUR);
423
            state = get_be32(s->pb);
423
            state = avio_rb32(s->pb);
424 424
            break;
425 425
        }
426
        state = (state << 8) | get_byte(s->pb);
426
        state = (state << 8) | avio_r8(s->pb);
427 427
    }
428 428
    AV_WB32(c->buf, state);
429 429

  
430
    if (get_buffer(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) <= 0 ||
430
    if (avio_read(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) <= 0 ||
431 431
        url_fseek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
432 432
        return AVERROR(EIO);
433 433

  
......
455 455
        if (!c->dv_demux->sys)
456 456
            return AVERROR(EIO);
457 457
        size = c->dv_demux->sys->frame_size;
458
        if (get_buffer(s->pb, c->buf, size) <= 0)
458
        if (avio_read(s->pb, c->buf, size) <= 0)
459 459
            return AVERROR(EIO);
460 460

  
461 461
        size = dv_produce_packet(c->dv_demux, pkt, c->buf, size);

Also available in: Unified diff