Revision e356fc57 libavformat/anm.c

View differences:

libavformat/anm.c
83 83
    AVStream *st;
84 84
    int i, ret;
85 85

  
86
    url_fskip(pb, 4); /* magic number */
86
    avio_seek(pb, 4, SEEK_CUR); /* magic number */
87 87
    if (avio_rl16(pb) != MAX_PAGES) {
88 88
        av_log_ask_for_sample(s, "max_pages != " AV_STRINGIFY(MAX_PAGES) "\n");
89 89
        return AVERROR_INVALIDDATA;
......
91 91

  
92 92
    anm->nb_pages   = avio_rl16(pb);
93 93
    anm->nb_records = avio_rl32(pb);
94
    url_fskip(pb, 2); /* max records per page */
94
    avio_seek(pb, 2, SEEK_CUR); /* max records per page */
95 95
    anm->page_table_offset = avio_rl16(pb);
96 96
    if (avio_rl32(pb) != ANIM_TAG)
97 97
        return AVERROR_INVALIDDATA;
......
107 107
    st->codec->height     = avio_rl16(pb);
108 108
    if (avio_r8(pb) != 0)
109 109
        goto invalid;
110
    url_fskip(pb, 1); /* frame rate multiplier info */
110
    avio_seek(pb, 1, SEEK_CUR); /* frame rate multiplier info */
111 111

  
112 112
    /* ignore last delta record (used for looping) */
113 113
    if (avio_r8(pb))  /* has_last_delta */
114 114
        anm->nb_records = FFMAX(anm->nb_records - 1, 0);
115 115

  
116
    url_fskip(pb, 1); /* last_delta_valid */
116
    avio_seek(pb, 1, SEEK_CUR); /* last_delta_valid */
117 117

  
118 118
    if (avio_r8(pb) != 0)
119 119
        goto invalid;
......
121 121
    if (avio_r8(pb) != 1)
122 122
        goto invalid;
123 123

  
124
    url_fskip(pb, 1); /* other recs per frame */
124
    avio_seek(pb, 1, SEEK_CUR); /* other recs per frame */
125 125

  
126 126
    if (avio_r8(pb) != 1)
127 127
        goto invalid;
128 128

  
129
    url_fskip(pb, 32); /* record_types */
129
    avio_seek(pb, 32, SEEK_CUR); /* record_types */
130 130
    st->nb_frames = avio_rl32(pb);
131 131
    av_set_pts_info(st, 64, 1, avio_rl16(pb));
132
    url_fskip(pb, 58);
132
    avio_seek(pb, 58, SEEK_CUR);
133 133

  
134 134
    /* color cycling and palette data */
135 135
    st->codec->extradata_size = 16*8 + 4*256;
......
193 193
    /* parse page header */
194 194
    if (anm->record < 0) {
195 195
        avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16), SEEK_SET);
196
        url_fskip(pb, 8 + 2*p->nb_records);
196
        avio_seek(pb, 8 + 2*p->nb_records, SEEK_CUR);
197 197
        anm->record = 0;
198 198
    }
199 199

  

Also available in: Unified diff