Revision e356fc57 libavformat/gxf.c

View differences:

libavformat/gxf.c
174 174
            else if (tag == MAT_LAST_FIELD)
175 175
                si->last_field = value;
176 176
        } else
177
            url_fskip(pb, tlen);
177
            avio_seek(pb, tlen, SEEK_CUR);
178 178
    }
179 179
}
180 180

  
......
223 223
            else if (tag == TRACK_FPF && (value == 1 || value == 2))
224 224
                si->fields_per_frame = value;
225 225
        } else
226
            url_fskip(pb, tlen);
226
            avio_seek(pb, tlen, SEEK_CUR);
227 227
    }
228 228
}
229 229

  
......
238 238
    int i;
239 239
    pkt_len -= 8;
240 240
    if (s->flags & AVFMT_FLAG_IGNIDX) {
241
        url_fskip(pb, pkt_len);
241
        avio_seek(pb, pkt_len, SEEK_CUR);
242 242
        return;
243 243
    }
244 244
    if (map_cnt > 1000) {
......
247 247
    }
248 248
    if (pkt_len < 4 * map_cnt) {
249 249
        av_log(s, AV_LOG_ERROR, "invalid index length\n");
250
        url_fskip(pb, pkt_len);
250
        avio_seek(pb, pkt_len, SEEK_CUR);
251 251
        return;
252 252
    }
253 253
    pkt_len -= 4 * map_cnt;
......
255 255
    for (i = 0; i < map_cnt; i++)
256 256
        av_add_index_entry(st, (uint64_t)avio_rl32(pb) * 1024,
257 257
                           i * (uint64_t)fields_per_map + 1, 0, 0, 0);
258
    url_fskip(pb, pkt_len);
258
    avio_seek(pb, pkt_len, SEEK_CUR);
259 259
}
260 260

  
261 261
static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
......
283 283
    }
284 284
    map_len -= len;
285 285
    gxf_material_tags(pb, &len, &si);
286
    url_fskip(pb, len);
286
    avio_seek(pb, len, SEEK_CUR);
287 287
    map_len -= 2;
288 288
    len = avio_rb16(pb); // length of track description
289 289
    if (len > map_len) {
......
301 301
        track_len = avio_rb16(pb);
302 302
        len -= track_len;
303 303
        gxf_track_tags(pb, &track_len, &si);
304
        url_fskip(pb, track_len);
304
        avio_seek(pb, track_len, SEEK_CUR);
305 305
        if (!(track_type & 0x80)) {
306 306
           av_log(s, AV_LOG_ERROR, "invalid track type %x\n", track_type);
307 307
           continue;
......
326 326
    if (len < 0)
327 327
        av_log(s, AV_LOG_ERROR, "invalid track description length specified\n");
328 328
    if (map_len)
329
        url_fskip(pb, map_len);
329
        avio_seek(pb, map_len, SEEK_CUR);
330 330
    if (!parse_packet_header(pb, &pkt_type, &len)) {
331 331
        av_log(s, AV_LOG_ERROR, "sync lost in header\n");
332 332
        return -1;
......
342 342
        if (len >= 0x39) {
343 343
            AVRational fps;
344 344
            len -= 0x39;
345
            url_fskip(pb, 5); // preamble
346
            url_fskip(pb, 0x30); // payload description
345
            avio_seek(pb, 5, SEEK_CUR); // preamble
346
            avio_seek(pb, 0x30, SEEK_CUR); // payload description
347 347
            fps = fps_umf2avr(avio_rl32(pb));
348 348
            if (!main_timebase.num || !main_timebase.den) {
349 349
                // this may not always be correct, but simply the best we can get
......
354 354
            av_log(s, AV_LOG_INFO, "UMF packet too short\n");
355 355
    } else
356 356
        av_log(s, AV_LOG_INFO, "UMF packet missing\n");
357
    url_fskip(pb, len);
357
    avio_seek(pb, len, SEEK_CUR);
358 358
    // set a fallback value, 60000/1001 is specified for audio-only files
359 359
    // so use that regardless of why we do not know the video frame rate.
360 360
    if (!main_timebase.num || !main_timebase.den)
......
437 437
            continue;
438 438
        }
439 439
        if (pkt_type != PKT_MEDIA) {
440
            url_fskip(pb, pkt_len);
440
            avio_seek(pb, pkt_len, SEEK_CUR);
441 441
            continue;
442 442
        }
443 443
        if (pkt_len < 16) {
......
462 462
            int last  = field_info & 0xffff; // last is exclusive
463 463
            int bps = av_get_bits_per_sample(st->codec->codec_id)>>3;
464 464
            if (first <= last && last*bps <= pkt_len) {
465
                url_fskip(pb, first*bps);
465
                avio_seek(pb, first*bps, SEEK_CUR);
466 466
                skip = pkt_len - last*bps;
467 467
                pkt_len = (last-first)*bps;
468 468
            } else
......
470 470
        }
471 471
        ret = av_get_packet(pb, pkt, pkt_len);
472 472
        if (skip)
473
            url_fskip(pb, skip);
473
            avio_seek(pb, skip, SEEK_CUR);
474 474
        pkt->stream_index = stream_index;
475 475
        pkt->dts = field_nr;
476 476
        return ret;

Also available in: Unified diff