Revision b7effd4e libavformat/filmstripdec.c

View differences:

libavformat/filmstripdec.c
44 44
        return AVERROR(EIO);
45 45

  
46 46
    url_fseek(pb, url_fsize(pb) - 36, SEEK_SET);
47
    if (get_be32(pb) != RAND_TAG) {
47
    if (avio_rb32(pb) != RAND_TAG) {
48 48
        av_log(s, AV_LOG_ERROR, "magic number not found");
49 49
        return AVERROR_INVALIDDATA;
50 50
    }
......
53 53
    if (!st)
54 54
        return AVERROR(ENOMEM);
55 55

  
56
    st->nb_frames = get_be32(pb);
57
    if (get_be16(pb) != 0) {
56
    st->nb_frames = avio_rb32(pb);
57
    if (avio_rb16(pb) != 0) {
58 58
        av_log_ask_for_sample(s, "unsupported packing method\n");
59 59
        return AVERROR_INVALIDDATA;
60 60
    }
......
64 64
    st->codec->codec_id   = CODEC_ID_RAWVIDEO;
65 65
    st->codec->pix_fmt    = PIX_FMT_RGBA;
66 66
    st->codec->codec_tag  = 0; /* no fourcc */
67
    st->codec->width      = get_be16(pb);
68
    st->codec->height     = get_be16(pb);
69
    film->leading         = get_be16(pb);
70
    av_set_pts_info(st, 64, 1, get_be16(pb));
67
    st->codec->width      = avio_rb16(pb);
68
    st->codec->height     = avio_rb16(pb);
69
    film->leading         = avio_rb16(pb);
70
    av_set_pts_info(st, 64, 1, avio_rb16(pb));
71 71

  
72 72
    url_fseek(pb, 0, SEEK_SET);
73 73

  

Also available in: Unified diff