Revision e356fc57

View differences:

libavformat/aea.c
62 62
        return AVERROR(ENOMEM);
63 63

  
64 64
    /* Parse the amount of channels and skip to pos 2048(0x800) */
65
    url_fskip(s->pb, 264);
65
    avio_seek(s->pb, 264, SEEK_CUR);
66 66
    st->codec->channels = avio_r8(s->pb);
67
    url_fskip(s->pb, 1783);
67
    avio_seek(s->pb, 1783, SEEK_CUR);
68 68

  
69 69

  
70 70
    st->codec->codec_type     = AVMEDIA_TYPE_AUDIO;
libavformat/aiffdec.c
70 70
    int res;
71 71

  
72 72
    if (!str) {
73
        url_fskip(s->pb, size);
73
        avio_seek(s->pb, size, SEEK_CUR);
74 74
        return;
75 75
    }
76 76

  
......
242 242
                av_log(s, AV_LOG_ERROR, "file is not seekable\n");
243 243
                return -1;
244 244
            }
245
            url_fskip(pb, size - 8);
245
            avio_seek(pb, size - 8, SEEK_CUR);
246 246
            break;
247 247
        case MKTAG('w', 'a', 'v', 'e'):
248 248
            if ((uint64_t)size > (1<<30))
......
256 256
        default: /* Jump */
257 257
            if (size & 1)   /* Always even aligned */
258 258
                size++;
259
            url_fskip (pb, size);
259
            avio_seek(pb, size, SEEK_CUR);
260 260
        }
261 261
    }
262 262

  
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

  
libavformat/ape.c
239 239

  
240 240
        /* Skip any stored wav header */
241 241
        if (!(ape->formatflags & MAC_FORMAT_FLAG_CREATE_WAV_HEADER))
242
            url_fskip(pb, ape->wavheaderlength);
242
            avio_seek(pb, ape->wavheaderlength, SEEK_CUR);
243 243
    }
244 244

  
245 245
    if(ape->totalframes > UINT_MAX / sizeof(APEFrame)){
libavformat/asfdec.c
350 350
        avio_rl16(pb); /* panes */
351 351
        st->codec->bits_per_coded_sample = avio_rl16(pb); /* depth */
352 352
        tag1 = avio_rl32(pb);
353
        url_fskip(pb, 20);
353
        avio_seek(pb, 20, SEEK_CUR);
354 354
        //                av_log(s, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX);
355 355
        if (sizeX > 40) {
356 356
            st->codec->extradata_size = sizeX - 40;
......
388 388
            st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
389 389
    }
390 390
    pos2 = url_ftell(pb);
391
    url_fskip(pb, size - (pos2 - pos1 + 24));
391
    avio_seek(pb, size - (pos2 - pos1 + 24), SEEK_CUR);
392 392

  
393 393
    return 0;
394 394
}
......
455 455
    get_tag(s, "author"   , 0, len2);
456 456
    get_tag(s, "copyright", 0, len3);
457 457
    get_tag(s, "comment"  , 0, len4);
458
    url_fskip(pb, len5);
458
    avio_seek(pb, len5, SEEK_CUR);
459 459

  
460 460
    return 0;
461 461
}
......
475 475
        if (name_len%2)     // must be even, broken lavf versions wrote len-1
476 476
            name_len += 1;
477 477
        if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
478
            url_fskip(pb, name_len - ret);
478
            avio_seek(pb, name_len - ret, SEEK_CUR);
479 479
        value_type = avio_rl16(pb);
480 480
        value_len  = avio_rl16(pb);
481 481
        if (!value_type && value_len%2)
......
505 505
        char lang[6];
506 506
        unsigned int lang_len = avio_r8(pb);
507 507
        if ((ret = avio_get_str16le(pb, lang_len, lang, sizeof(lang))) < lang_len)
508
            url_fskip(pb, lang_len - ret);
508
            avio_seek(pb, lang_len - ret, SEEK_CUR);
509 509
        if (j < 128)
510 510
            av_strlcpy(asf->stream_languages[j], lang, sizeof(*asf->stream_languages));
511 511
    }
......
531 531
        value_len=  avio_rl32(pb);
532 532

  
533 533
        if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
534
            url_fskip(pb, name_len - ret);
534
            avio_seek(pb, name_len - ret, SEEK_CUR);
535 535
        //av_log(s, AV_LOG_ERROR, "%d %d %d %d %d <%s>\n", i, stream_num, name_len, value_type, value_len, name);
536 536
        value_num= avio_rl16(pb);//we should use get_value() here but it does not work 2 is le16 here but le32 elsewhere
537
        url_fskip(pb, value_len - 2);
537
        avio_seek(pb, value_len - 2, SEEK_CUR);
538 538

  
539 539
        if(stream_num<128){
540 540
            if     (!strcmp(name, "AspectRatioX")) asf->dar[stream_num].num= value_num;
......
571 571
        avio_rl32(pb);             // flags
572 572
        name_len = avio_rl32(pb);  // name length
573 573
        if ((ret = avio_get_str16le(pb, name_len * 2, name, sizeof(name))) < name_len)
574
            url_fskip(pb, name_len - ret);
574
            avio_seek(pb, name_len - ret, SEEK_CUR);
575 575
        ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name );
576 576
    }
577 577

  
......
826 826
//            for(i=0; i<asf->packet_replic_size-8; i++)
827 827
//                av_log(s, AV_LOG_DEBUG, "%02X ",avio_r8(pb));
828 828
//            av_log(s, AV_LOG_DEBUG, "\n");
829
            url_fskip(pb, 10);
829
            avio_seek(pb, 10, SEEK_CUR);
830 830
            ts0= avio_rl64(pb);
831 831
            ts1= avio_rl64(pb);
832
            url_fskip(pb, 12);
832
            avio_seek(pb, 12, SEEK_CUR);
833 833
            avio_rl32(pb);
834
            url_fskip(pb, asf->packet_replic_size - 8 - 38 - 4);
834
            avio_seek(pb, asf->packet_replic_size - 8 - 38 - 4, SEEK_CUR);
835 835
            if(ts0!= -1) asf->packet_frag_timestamp= ts0/10000;
836 836
            else         asf->packet_frag_timestamp= AV_NOPTS_VALUE;
837 837
        }else
838
            url_fskip(pb, asf->packet_replic_size - 8);
838
            avio_seek(pb, asf->packet_replic_size - 8, SEEK_CUR);
839 839
        rsize += asf->packet_replic_size; // FIXME - check validity
840 840
    } else if (asf->packet_replic_size==1){
841 841
        // multipacket - frag_offset is beginning timestamp
......
895 895
            //printf("PacketLeftSize:%d  Pad:%d Pos:%"PRId64"\n", asf->packet_size_left, asf->packet_padsize, url_ftell(pb));
896 896
            assert(ret>=0);
897 897
            /* fail safe */
898
            url_fskip(pb, ret);
898
            avio_seek(pb, ret, SEEK_CUR);
899 899

  
900 900
            asf->packet_pos= url_ftell(pb);
901 901
            if (asf->data_object_size != (uint64_t)-1 &&
......
914 914
                ) {
915 915
                asf->packet_time_start = 0;
916 916
                /* unhandled packet (should not happen) */
917
                url_fskip(pb, asf->packet_frag_size);
917
                avio_seek(pb, asf->packet_frag_size, SEEK_CUR);
918 918
                asf->packet_size_left -= asf->packet_frag_size;
919 919
                if(asf->stream_index < 0)
920 920
                    av_log(s, AV_LOG_ERROR, "ff asf skip %d (unknown stream)\n", asf->packet_frag_size);
......
934 934
            if (asf->packet_multi_size < asf->packet_obj_size)
935 935
            {
936 936
                asf->packet_time_start = 0;
937
                url_fskip(pb, asf->packet_multi_size);
937
                avio_seek(pb, asf->packet_multi_size, SEEK_CUR);
938 938
                asf->packet_size_left -= asf->packet_multi_size;
939 939
                continue;
940 940
            }
libavformat/avidec.c
321 321
                }
322 322
                if (name)
323 323
                    av_metadata_set2(&s->metadata, name, buffer, 0);
324
                url_fskip(s->pb, size);
324
                avio_seek(s->pb, size, SEEK_CUR);
325 325
            }
326 326
            break;
327 327
        }
328 328
        default:
329
            url_fskip(s->pb, size);
329
            avio_seek(s->pb, size, SEEK_CUR);
330 330
            break;
331 331
        }
332 332
    }
......
392 392
            unsigned char date[64] = {0};
393 393
            size += (size & 1);
394 394
            size -= avio_read(pb, date, FFMIN(size, sizeof(date)-1));
395
            url_fskip(pb, size);
395
            avio_seek(pb, size, SEEK_CUR);
396 396
            avi_metadata_creation_time(&s->metadata, date);
397 397
            break;
398 398
        }
399 399
        case MKTAG('d', 'm', 'l', 'h'):
400 400
            avi->is_odml = 1;
401
            url_fskip(pb, size + (size & 1));
401
            avio_seek(pb, size + (size & 1), SEEK_CUR);
402 402
            break;
403 403
        case MKTAG('a', 'm', 'v', 'h'):
404 404
            amv_file_format=1;
......
410 410
            avio_rl32(pb);
411 411
            avi->non_interleaved |= avio_rl32(pb) & AVIF_MUSTUSEINDEX;
412 412

  
413
            url_fskip(pb, 2 * 4);
413
            avio_seek(pb, 2 * 4, SEEK_CUR);
414 414
            avio_rl32(pb);
415 415
            avio_rl32(pb);
416 416
            avih_width=avio_rl32(pb);
417 417
            avih_height=avio_rl32(pb);
418 418

  
419
            url_fskip(pb, size - 10 * 4);
419
            avio_seek(pb, size - 10 * 4, SEEK_CUR);
420 420
            break;
421 421
        case MKTAG('s', 't', 'r', 'h'):
422 422
            /* stream header */
......
425 425
            handler = avio_rl32(pb); /* codec tag */
426 426

  
427 427
            if(tag1 == MKTAG('p', 'a', 'd', 's')){
428
                url_fskip(pb, size - 8);
428
                avio_seek(pb, size - 8, SEEK_CUR);
429 429
                break;
430 430
            }else{
431 431
                stream_index++;
......
469 469
                        goto fail;
470 470
                }
471 471
                s->streams[0]->priv_data = ast;
472
                url_fskip(pb, 3 * 4);
472
                avio_seek(pb, 3 * 4, SEEK_CUR);
473 473
                ast->scale = avio_rl32(pb);
474 474
                ast->rate = avio_rl32(pb);
475
                url_fskip(pb, 4);  /* start time */
475
                avio_seek(pb, 4, SEEK_CUR);  /* start time */
476 476

  
477 477
                dv_dur = avio_rl32(pb);
478 478
                if (ast->scale > 0 && ast->rate > 0 && dv_dur > 0) {
......
485 485
                 */
486 486

  
487 487
                stream_index = s->nb_streams - 1;
488
                url_fskip(pb, size - 9*4);
488
                avio_seek(pb, size - 9*4, SEEK_CUR);
489 489
                break;
490 490
            }
491 491

  
......
542 542
            if(ast->sample_size == 0)
543 543
                st->duration = st->nb_frames;
544 544
            ast->frame_offset= ast->cum_len;
545
            url_fskip(pb, size - 12 * 4);
545
            avio_seek(pb, size - 12 * 4, SEEK_CUR);
546 546
            break;
547 547
        case MKTAG('s', 't', 'r', 'f'):
548 548
            /* stream header */
549 549
            if (stream_index >= (unsigned)s->nb_streams || avi->dv_demux) {
550
                url_fskip(pb, size);
550
                avio_seek(pb, size, SEEK_CUR);
551 551
            } else {
552 552
                uint64_t cur_pos = url_ftell(pb);
553 553
                if (cur_pos < list_end)
......
560 560
                        st->codec->height=avih_height;
561 561
                        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
562 562
                        st->codec->codec_id = CODEC_ID_AMV;
563
                        url_fskip(pb, size);
563
                        avio_seek(pb, size, SEEK_CUR);
564 564
                        break;
565 565
                    }
566 566
                    tag1 = ff_get_bmp_header(pb, st);
......
620 620
                    }
621 621
                    st->codec->height= FFABS(st->codec->height);
622 622

  
623
//                    url_fskip(pb, size - 5 * 4);
623
//                    avio_seek(pb, size - 5 * 4, SEEK_CUR);
624 624
                    break;
625 625
                case AVMEDIA_TYPE_AUDIO:
626 626
                    ff_get_wav_header(pb, st->codec, size);
......
630 630
                        ast->sample_size= st->codec->block_align;
631 631
                    }
632 632
                    if (size&1) /* 2-aligned (fix for Stargate SG-1 - 3x18 - Shades of Grey.avi) */
633
                        url_fskip(pb, 1);
633
                        avio_seek(pb, 1, SEEK_CUR);
634 634
                    /* Force parsing as several audio frames can be in
635 635
                     * one packet and timestamps refer to packet start. */
636 636
                    st->need_parsing = AVSTREAM_PARSE_TIMESTAMPS;
......
658 658
                    st->codec->codec_type = AVMEDIA_TYPE_DATA;
659 659
                    st->codec->codec_id= CODEC_ID_NONE;
660 660
                    st->codec->codec_tag= 0;
661
                    url_fskip(pb, size);
661
                    avio_seek(pb, size, SEEK_CUR);
662 662
                    break;
663 663
                }
664 664
            }
......
710 710
            }
711 711
            /* skip tag */
712 712
            size += (size & 1);
713
            url_fskip(pb, size);
713
            avio_seek(pb, size, SEEK_CUR);
714 714
            break;
715 715
        }
716 716
    }
......
762 762
            goto error;
763 763

  
764 764
        ret = avio_get_str16le(pb, desc_len, desc, sizeof(desc));
765
        url_fskip(pb, desc_len - ret);
765
        avio_seek(pb, desc_len - ret, SEEK_CUR);
766 766
        if (*desc)
767 767
            av_metadata_set2(&st->metadata, "title", desc, 0);
768 768

  
......
1008 1008
        //parse JUNK
1009 1009
           ||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K')
1010 1010
           ||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){
1011
            url_fskip(pb, size);
1011
            avio_seek(pb, size, SEEK_CUR);
1012 1012
//av_log(s, AV_LOG_DEBUG, "SKIP\n");
1013 1013
            goto resync;
1014 1014
        }
1015 1015

  
1016 1016
        //parse stray LIST
1017 1017
        if(d[0] == 'L' && d[1] == 'I' && d[2] == 'S' && d[3] == 'T'){
1018
            url_fskip(pb, 4);
1018
            avio_seek(pb, 4, SEEK_CUR);
1019 1019
            goto resync;
1020 1020
        }
1021 1021

  
......
1026 1026

  
1027 1027
        //detect ##ix chunk and skip
1028 1028
        if(d[2] == 'i' && d[3] == 'x' && n < s->nb_streams){
1029
            url_fskip(pb, size);
1029
            avio_seek(pb, size, SEEK_CUR);
1030 1030
            goto resync;
1031 1031
        }
1032 1032

  
......
1060 1060
               /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering
1061 1061
               || st->discard >= AVDISCARD_ALL){
1062 1062
                ast->frame_offset += get_duration(ast, size);
1063
                url_fskip(pb, size);
1063
                avio_seek(pb, size, SEEK_CUR);
1064 1064
                goto resync;
1065 1065
            }
1066 1066

  
libavformat/avienc.c
444 444
         /* Updating one entry in the AVI OpenDML master index */
445 445
         avio_seek(pb, avist->indexes.indx_start - 8, SEEK_SET);
446 446
         ffio_wfourcc(pb, "indx");            /* enabling this entry */
447
         url_fskip(pb, 8);
447
         avio_seek(pb, 8, SEEK_CUR);
448 448
         avio_wl32(pb, avi->riff_id);         /* nEntriesInUse */
449
         url_fskip(pb, 16*avi->riff_id);
449
         avio_seek(pb, 16*avi->riff_id, SEEK_CUR);
450 450
         avio_wl64(pb, ix);                   /* qwOffset */
451 451
         avio_wl32(pb, pos - ix);             /* dwSize */
452 452
         avio_wl32(pb, avist->indexes.entry); /* dwDuration */
......
603 603
            file_size = url_ftell(pb);
604 604
            avio_seek(pb, avi->odml_list - 8, SEEK_SET);
605 605
            ffio_wfourcc(pb, "LIST"); /* Making this AVI OpenDML one */
606
            url_fskip(pb, 16);
606
            avio_seek(pb, 16, SEEK_CUR);
607 607

  
608 608
            for (n=nb_frames=0;n<s->nb_streams;n++) {
609 609
                AVCodecContext *stream = s->streams[n]->codec;
libavformat/avs.c
61 61

  
62 62
    s->ctx_flags |= AVFMTCTX_NOHEADER;
63 63

  
64
    url_fskip(s->pb, 4);
64
    avio_seek(s->pb, 4, SEEK_CUR);
65 65
    avs->width = avio_rl16(s->pb);
66 66
    avs->height = avio_rl16(s->pb);
67 67
    avs->bits_per_sample = avio_rl16(s->pb);
......
204 204
                break;
205 205

  
206 206
            default:
207
                url_fskip(s->pb, size - 4);
207
                avio_seek(s->pb, size - 4, SEEK_CUR);
208 208
            }
209 209
        }
210 210
    }
libavformat/bfi.c
65 65
        return AVERROR(ENOMEM);
66 66

  
67 67
    /* Set the total number of frames. */
68
    url_fskip(pb, 8);
68
    avio_seek(pb, 8, SEEK_CUR);
69 69
    chunk_header           = avio_rl32(pb);
70 70
    bfi->nframes           = avio_rl32(pb);
71 71
    avio_rl32(pb);
72 72
    avio_rl32(pb);
73 73
    avio_rl32(pb);
74 74
    fps                    = avio_rl32(pb);
75
    url_fskip(pb, 12);
75
    avio_seek(pb, 12, SEEK_CUR);
76 76
    vstream->codec->width  = avio_rl32(pb);
77 77
    vstream->codec->height = avio_rl32(pb);
78 78

  
79 79
    /*Load the palette to extradata */
80
    url_fskip(pb, 8);
80
    avio_seek(pb, 8, SEEK_CUR);
81 81
    vstream->codec->extradata      = av_malloc(768);
82 82
    vstream->codec->extradata_size = 768;
83 83
    avio_read(pb, vstream->codec->extradata,
libavformat/bink.c
98 98
        return AVERROR(EIO);
99 99
    }
100 100

  
101
    url_fskip(pb, 4);
101
    avio_seek(pb, 4, SEEK_CUR);
102 102

  
103 103
    vst->codec->width  = avio_rl32(pb);
104 104
    vst->codec->height = avio_rl32(pb);
......
127 127
    }
128 128

  
129 129
    if (bink->num_audio_tracks) {
130
        url_fskip(pb, 4 * bink->num_audio_tracks);
130
        avio_seek(pb, 4 * bink->num_audio_tracks, SEEK_CUR);
131 131

  
132 132
        for (i = 0; i < bink->num_audio_tracks; i++) {
133 133
            ast = av_new_stream(s, 1);
......
169 169
                           keyframe ? AVINDEX_KEYFRAME : 0);
170 170
    }
171 171

  
172
    url_fskip(pb, 4);
172
    avio_seek(pb, 4, SEEK_CUR);
173 173

  
174 174
    bink->current_track = -1;
175 175
    return 0;
libavformat/c93.c
122 122
                    return AVERROR(ENOMEM);
123 123
                c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
124 124
            }
125
            url_fskip(pb, 26); /* VOC header */
125
            avio_seek(pb, 26, SEEK_CUR); /* VOC header */
126 126
            ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);
127 127
            if (ret > 0) {
128 128
                pkt->stream_index = 1;
libavformat/cafdec.c
114 114
            av_log(s, AV_LOG_ERROR, "invalid AAC magic cookie\n");
115 115
            return AVERROR_INVALIDDATA;
116 116
        }
117
        url_fskip(pb, skip);
117
        avio_seek(pb, skip, SEEK_CUR);
118 118
    } else if (st->codec->codec_id == CODEC_ID_ALAC) {
119 119
#define ALAC_PREAMBLE 12
120 120
#define ALAC_HEADER   36
121 121
        if (size < ALAC_PREAMBLE + ALAC_HEADER) {
122 122
            av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n");
123
            url_fskip(pb, size);
123
            avio_seek(pb, size, SEEK_CUR);
124 124
            return AVERROR_INVALIDDATA;
125 125
        }
126
        url_fskip(pb, ALAC_PREAMBLE);
126
        avio_seek(pb, ALAC_PREAMBLE, SEEK_CUR);
127 127
        st->codec->extradata = av_mallocz(ALAC_HEADER + FF_INPUT_BUFFER_PADDING_SIZE);
128 128
        if (!st->codec->extradata)
129 129
            return AVERROR(ENOMEM);
130 130
        avio_read(pb, st->codec->extradata, ALAC_HEADER);
131 131
        st->codec->extradata_size = ALAC_HEADER;
132
        url_fskip(pb, size - ALAC_PREAMBLE - ALAC_HEADER);
132
        avio_seek(pb, size - ALAC_PREAMBLE - ALAC_HEADER, SEEK_CUR);
133 133
    } else {
134 134
        st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
135 135
        if (!st->codec->extradata)
......
201 201
    int found_data, ret;
202 202
    int64_t size;
203 203

  
204
    url_fskip(pb, 8); /* magic, version, file flags */
204
    avio_seek(pb, 8, SEEK_CUR); /* magic, version, file flags */
205 205

  
206 206
    /* audio description chunk */
207 207
    if (avio_rb32(pb) != MKBETAG('d','e','s','c')) {
......
233 233

  
234 234
        switch (tag) {
235 235
        case MKBETAG('d','a','t','a'):
236
            url_fskip(pb, 4); /* edit count */
236
            avio_seek(pb, 4, SEEK_CUR); /* edit count */
237 237
            caf->data_start = url_ftell(pb);
238 238
            caf->data_size  = size < 0 ? -1 : size - 4;
239 239
            if (caf->data_size > 0 && !url_is_streamed(pb))
240
                url_fskip(pb, caf->data_size);
240
                avio_seek(pb, caf->data_size, SEEK_CUR);
241 241
            found_data = 1;
242 242
            break;
243 243

  
......
265 265
        case MKBETAG('f','r','e','e'):
266 266
            if (size < 0)
267 267
                return AVERROR_INVALIDDATA;
268
            url_fskip(pb, size);
268
            avio_seek(pb, size, SEEK_CUR);
269 269
            break;
270 270
        }
271 271
    }
libavformat/dxa.c
96 96
        c->has_sound = 1;
97 97
        size = avio_rb32(pb);
98 98
        c->vidpos = url_ftell(pb) + size;
99
        url_fskip(pb, 16);
99
        avio_seek(pb, 16, SEEK_CUR);
100 100
        fsize = avio_rl32(pb);
101 101

  
102 102
        ast = av_new_stream(s, 0);
......
108 108
            tag = avio_rl32(pb);
109 109
            fsize = avio_rl32(pb);
110 110
            if(tag == MKTAG('d', 'a', 't', 'a')) break;
111
            url_fskip(pb, fsize);
111
            avio_seek(pb, fsize, SEEK_CUR);
112 112
        }
113 113
        c->bpc = (fsize + c->frames - 1) / c->frames;
114 114
        if(ast->codec->block_align)
libavformat/eacdata.c
62 62
    };
63 63

  
64 64
    sample_rate = avio_rb16(pb);
65
    url_fskip(pb, 12);
65
    avio_seek(pb, 12, SEEK_CUR);
66 66

  
67 67
    st = av_new_stream(s, 0);
68 68
    if (!st)
libavformat/electronicarts.c
222 222
    ea->bytes        = avio_r8(pb);   /* 1=8-bit, 2=16-bit */
223 223
    ea->num_channels = avio_r8(pb);
224 224
    compression_type = avio_r8(pb);
225
    url_fskip(pb, 13);
225
    avio_seek(pb, 13, SEEK_CUR);
226 226

  
227 227
    switch (compression_type) {
228 228
    case 0:
......
261 261
{
262 262
    EaDemuxContext *ea = s->priv_data;
263 263
    AVIOContext *pb = s->pb;
264
    url_fskip(pb, 4);
264
    avio_seek(pb, 4, SEEK_CUR);
265 265
    ea->width  = avio_rl16(pb);
266 266
    ea->height = avio_rl16(pb);
267 267
    ea->time_base = (AVRational){1,15};
......
274 274
    EaDemuxContext *ea = s->priv_data;
275 275
    AVIOContext *pb = s->pb;
276 276

  
277
    url_fskip(pb, 16);
277
    avio_seek(pb, 16, SEEK_CUR);
278 278
    ea->time_base.den = avio_rl32(pb);
279 279
    ea->time_base.num = avio_rl32(pb);
280 280
    ea->video_codec = CODEC_ID_VP6;
......
316 316
            case SHEN_TAG :
317 317
                blockid = avio_rl32(pb);
318 318
                if (blockid == GSTR_TAG) {
319
                    url_fskip(pb, 4);
319
                    avio_seek(pb, 4, SEEK_CUR);
320 320
                } else if ((blockid & 0xFFFF)!=PT00_TAG) {
321 321
                    av_log (s, AV_LOG_ERROR, "unknown SCHl headerid\n");
322 322
                    return 0;
......
474 474
        /* audio data */
475 475
        case ISNh_TAG:
476 476
            /* header chunk also contains data; skip over the header portion*/
477
            url_fskip(pb, 32);
477
            avio_seek(pb, 32, SEEK_CUR);
478 478
            chunk_size -= 32;
479 479
        case ISNd_TAG:
480 480
        case SCDl_TAG:
481 481
        case SNDC_TAG:
482 482
        case SDEN_TAG:
483 483
            if (!ea->audio_codec) {
484
                url_fskip(pb, chunk_size);
484
                avio_seek(pb, chunk_size, SEEK_CUR);
485 485
                break;
486 486
            } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||
487 487
                       ea->audio_codec == CODEC_ID_MP3) {
488 488
                num_samples = avio_rl32(pb);
489
                url_fskip(pb, 8);
489
                avio_seek(pb, 8, SEEK_CUR);
490 490
                chunk_size -= 12;
491 491
            }
492 492
            ret = av_get_packet(pb, pkt, chunk_size);
libavformat/ffmdec.c
187 187
    int64_t dts;
188 188

  
189 189
    ffm_seek1(s, pos);
190
    url_fskip(pb, 4);
190
    avio_seek(pb, 4, SEEK_CUR);
191 191
    dts = avio_rb64(pb);
192 192
#ifdef DEBUG_SEEK
193 193
    av_log(s, AV_LOG_DEBUG, "dts=%0.6f\n", dts / 1000000.0);
libavformat/filmstripdec.c
59 59
        return AVERROR_INVALIDDATA;
60 60
    }
61 61

  
62
    url_fskip(pb, 2);
62
    avio_seek(pb, 2, SEEK_CUR);
63 63
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
64 64
    st->codec->codec_id   = CODEC_ID_RAWVIDEO;
65 65
    st->codec->pix_fmt    = PIX_FMT_RGBA;
......
84 84
        return AVERROR(EIO);
85 85
    pkt->dts = url_ftell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);
86 86
    pkt->size = av_get_packet(s->pb, pkt, st->codec->width * st->codec->height * 4);
87
    url_fskip(s->pb, st->codec->width * film->leading * 4);
87
    avio_seek(s->pb, st->codec->width * film->leading * 4, SEEK_CUR);
88 88
    if (pkt->size < 0)
89 89
        return pkt->size;
90 90
    pkt->flags |= AV_PKT_FLAG_KEY;
libavformat/flvdec.c
113 113
static int amf_get_string(AVIOContext *ioc, char *buffer, int buffsize) {
114 114
    int length = avio_rb16(ioc);
115 115
    if(length >= buffsize) {
116
        url_fskip(ioc, length);
116
        avio_seek(ioc, length, SEEK_CUR);
117 117
        return -1;
118 118
    }
119 119

  
......
149 149
            unsigned int keylen;
150 150

  
151 151
            while(url_ftell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) {
152
                url_fskip(ioc, keylen); //skip key string
152
                avio_seek(ioc, keylen, SEEK_CUR); //skip key string
153 153
                if(amf_parse_object(s, NULL, NULL, NULL, max_pos, depth + 1) < 0)
154 154
                    return -1; //if we couldn't skip, bomb out.
155 155
            }
......
162 162
        case AMF_DATA_TYPE_UNSUPPORTED:
163 163
            break; //these take up no additional space
164 164
        case AMF_DATA_TYPE_MIXEDARRAY:
165
            url_fskip(ioc, 4); //skip 32-bit max array index
165
            avio_seek(ioc, 4, SEEK_CUR); //skip 32-bit max array index
166 166
            while(url_ftell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) {
167 167
                //this is the only case in which we would want a nested parse to not skip over the object
168 168
                if(amf_parse_object(s, astream, vstream, str_val, max_pos, depth + 1) < 0)
......
182 182
        }
183 183
            break;
184 184
        case AMF_DATA_TYPE_DATE:
185
            url_fskip(ioc, 8 + 2); //timestamp (double) and UTC offset (int16)
185
            avio_seek(ioc, 8 + 2, SEEK_CUR); //timestamp (double) and UTC offset (int16)
186 186
            break;
187 187
        default: //unsupported type, we couldn't skip
188 188
            return -1;
......
254 254
{
255 255
    int offset, flags;
256 256

  
257
    url_fskip(s->pb, 4);
257
    avio_seek(s->pb, 4, SEEK_CUR);
258 258
    flags = avio_r8(s->pb);
259 259
    /* old flvtool cleared this field */
260 260
    /* FIXME: better fix needed */
......
278 278

  
279 279
    offset = avio_rb32(s->pb);
280 280
    avio_seek(s->pb, offset, SEEK_SET);
281
    url_fskip(s->pb, 4);
281
    avio_seek(s->pb, 4, SEEK_CUR);
282 282

  
283 283
    s->start_time = 0;
284 284

  
......
304 304
    int64_t dts, pts = AV_NOPTS_VALUE;
305 305
    AVStream *st = NULL;
306 306

  
307
 for(;;url_fskip(s->pb, 4)){ /* pkt size is repeated at end. skip it */
307
 for(;;avio_seek(s->pb, 4, SEEK_CUR)){ /* pkt size is repeated at end. skip it */
308 308
    pos = url_ftell(s->pb);
309 309
    type = avio_r8(s->pb);
310 310
    size = avio_rb24(s->pb);
......
313 313
//    av_log(s, AV_LOG_DEBUG, "type:%d, size:%d, dts:%d\n", type, size, dts);
314 314
    if (url_feof(s->pb))
315 315
        return AVERROR_EOF;
316
    url_fskip(s->pb, 3); /* stream id, always 0 */
316
    avio_seek(s->pb, 3, SEEK_CUR); /* stream id, always 0 */
317 317
    flags = 0;
318 318

  
319 319
    if(size == 0)
......
454 454
        pkt->flags |= AV_PKT_FLAG_KEY;
455 455

  
456 456
leave:
457
    url_fskip(s->pb, 4);
457
    avio_seek(s->pb, 4, SEEK_CUR);
458 458
    return ret;
459 459
}
460 460

  
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;
libavformat/id3v2.c
171 171
    unsync = flags & 0x80;
172 172

  
173 173
    if (isv34 && flags & 0x40) /* Extended header present, just skip over it */
174
        url_fskip(s->pb, get_size(s->pb, 4));
174
        avio_seek(s->pb, get_size(s->pb, 4), SEEK_CUR);
175 175

  
176 176
    while (len >= taghdrlen) {
177 177
        unsigned int tflags;
......
205 205

  
206 206
        if (tflags & (ID3v2_FLAG_ENCRYPTION | ID3v2_FLAG_COMPRESSION)) {
207 207
            av_log(s, AV_LOG_WARNING, "Skipping encrypted/compressed ID3v2 frame %s.\n", tag);
208
            url_fskip(s->pb, tlen);
208
            avio_seek(s->pb, tlen, SEEK_CUR);
209 209
        } else if (tag[0] == 'T') {
210 210
            if (unsync || tunsync) {
211 211
                int i, j;
......
226 226
        else if (!tag[0]) {
227 227
            if (tag[1])
228 228
                av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding");
229
            url_fskip(s->pb, tlen);
229
            avio_seek(s->pb, tlen, SEEK_CUR);
230 230
            break;
231 231
        }
232 232
        /* Skip to end of tag */
......
235 235

  
236 236
    if (len > 0) {
237 237
        /* Skip padding */
238
        url_fskip(s->pb, len);
238
        avio_seek(s->pb, len, SEEK_CUR);
239 239
    }
240 240
    if (version == 4 && flags & 0x10) /* Footer preset, always 10 bytes, skip over it */
241
        url_fskip(s->pb, 10);
241
        avio_seek(s->pb, 10, SEEK_CUR);
242 242

  
243 243
    av_free(buffer);
244 244
    return;
245 245

  
246 246
  error:
247 247
    av_log(s, AV_LOG_INFO, "ID3v2.%d tag skipped, cannot handle %s\n", version, reason);
248
    url_fskip(s->pb, len);
248
    avio_seek(s->pb, len, SEEK_CUR);
249 249
    av_free(buffer);
250 250
}
251 251

  
libavformat/iff.c
134 134
        return AVERROR(ENOMEM);
135 135

  
136 136
    st->codec->channels = 1;
137
    url_fskip(pb, 8);
137
    avio_seek(pb, 8, SEEK_CUR);
138 138
    // codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content
139 139
    st->codec->codec_tag = avio_rl32(pb);
140 140

  
......
152 152

  
153 153
            if (data_size < 14)
154 154
                return AVERROR_INVALIDDATA;
155
            url_fskip(pb, 12);
155
            avio_seek(pb, 12, SEEK_CUR);
156 156
            st->codec->sample_rate = avio_rb16(pb);
157 157
            if (data_size >= 16) {
158
                url_fskip(pb, 1);
158
                avio_seek(pb, 1, SEEK_CUR);
159 159
                compression        = avio_r8(pb);
160 160
            }
161 161
            break;
......
186 186
                return AVERROR_INVALIDDATA;
187 187
            st->codec->width                 = avio_rb16(pb);
188 188
            st->codec->height                = avio_rb16(pb);
189
            url_fskip(pb, 4); // x, y offset
189
            avio_seek(pb, 4, SEEK_CUR); // x, y offset
190 190
            st->codec->bits_per_coded_sample = avio_r8(pb);
191 191
            if (data_size >= 11) {
192
                url_fskip(pb, 1); // masking
192
                avio_seek(pb, 1, SEEK_CUR); // masking
193 193
                compression                  = avio_r8(pb);
194 194
            }
195 195
            if (data_size >= 16) {
196
                url_fskip(pb, 3); // paddding, transparent
196
                avio_seek(pb, 3, SEEK_CUR); // paddding, transparent
197 197
                st->sample_aspect_ratio.num  = avio_r8(pb);
198 198
                st->sample_aspect_ratio.den  = avio_r8(pb);
199 199
            }
......
223 223
                return res;
224 224
            }
225 225
        }
226
        url_fskip(pb, data_size - (url_ftell(pb) - orig_pos) + (data_size & 1));
226
        avio_seek(pb, data_size - (url_ftell(pb) - orig_pos) + (data_size & 1), SEEK_CUR);
227 227
    }
228 228

  
229 229
    avio_seek(pb, iff->body_pos, SEEK_SET);
libavformat/ingenientdec.c
35 35
    w = avio_rl16(s->pb);
36 36
    h = avio_rl16(s->pb);
37 37

  
38
    url_fskip(s->pb, 8); // zero + size (padded?)
39
    url_fskip(s->pb, 2);
38
    avio_seek(s->pb, 8, SEEK_CUR); // zero + size (padded?)
39
    avio_seek(s->pb, 2, SEEK_CUR);
40 40
    unk1 = avio_rl16(s->pb);
41 41
    unk2 = avio_rl16(s->pb);
42
    url_fskip(s->pb, 22); // ASCII timestamp
42
    avio_seek(s->pb, 22, SEEK_CUR); // ASCII timestamp
43 43

  
44 44
    av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n",
45 45
        size, w, h, unk1, unk2);
libavformat/iv8.c
70 70
        return -1;
71 71

  
72 72
    if(type==258){
73
        url_fskip(s->pb, size);
73
        avio_seek(s->pb, size, SEEK_CUR);
74 74
        goto retry;
75 75
    }
76 76

  
libavformat/lmlm4.c
100 100
    if ((ret = av_get_packet(pb, pkt, frame_size)) <= 0)
101 101
        return AVERROR(EIO);
102 102

  
103
    url_fskip(pb, padding);
103
    avio_seek(pb, padding, SEEK_CUR);
104 104

  
105 105
    switch (frame_type) {
106 106
        case LMLM4_I_FRAME:
libavformat/lxfdec.c
137 137
    case 0:
138 138
        //video
139 139
        //skip VBI data and metadata
140
        url_fskip(pb, (int64_t)(uint32_t)AV_RL32(&header[44]) +
141
                      (int64_t)(uint32_t)AV_RL32(&header[52]));
140
        avio_seek(pb, (int64_t)(uint32_t)AV_RL32(&header[44]) +
141
                      (int64_t)(uint32_t)AV_RL32(&header[52]), SEEK_CUR);
142 142
        break;
143 143
    case 1:
144 144
        //audio
......
255 255

  
256 256
    if (format == 1) {
257 257
        //skip extended field data
258
        url_fskip(s->pb, (uint32_t)AV_RL32(&header[40]));
258
        avio_seek(s->pb, (uint32_t)AV_RL32(&header[40]), SEEK_CUR);
259 259
    }
260 260

  
261 261
    return 0;
libavformat/matroskadec.c
1393 1393
            int flavor;
1394 1394
            ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size,
1395 1395
                          0, NULL, NULL, NULL, NULL);
1396
            url_fskip(&b, 22);
1396
            avio_seek(&b, 22, SEEK_CUR);
1397 1397
            flavor                       = avio_rb16(&b);
1398 1398
            track->audio.coded_framesize = avio_rb32(&b);
1399
            url_fskip(&b, 12);
1399
            avio_seek(&b, 12, SEEK_CUR);
1400 1400
            track->audio.sub_packet_h    = avio_rb16(&b);
1401 1401
            track->audio.frame_size      = avio_rb16(&b);
1402 1402
            track->audio.sub_packet_size = avio_rb16(&b);
libavformat/mov.c
296 296
            parse = mov_read_udta_string;
297 297

  
298 298
        if (!parse) { /* skip leaf atoms data */
299
            url_fskip(pb, a.size);
299
            avio_seek(pb, a.size, SEEK_CUR);
300 300
        } else {
301 301
            int64_t start_pos = url_ftell(pb);
302 302
            int64_t left;
......
308 308
                return 0;
309 309
            left = a.size - url_ftell(pb) + start_pos;
310 310
            if (left > 0) /* skip garbage at atom end */
311
                url_fskip(pb, left);
311
                avio_seek(pb, left, SEEK_CUR);
312 312
        }
313 313

  
314 314
        total_size += a.size;
315 315
    }
316 316

  
317 317
    if (total_size < atom.size && atom.size < 0x7ffff)
318
        url_fskip(pb, atom.size - total_size);
318
        avio_seek(pb, atom.size - total_size, SEEK_CUR);
319 319

  
320 320
    return 0;
321 321
}
......
357 357
            uint16_t volume_len, len;
358 358
            int16_t type;
359 359

  
360
            url_fskip(pb, 10);
360
            avio_seek(pb, 10, SEEK_CUR);
361 361

  
362 362
            volume_len = avio_r8(pb);
363 363
            volume_len = FFMIN(volume_len, 27);
......
365 365
            dref->volume[volume_len] = 0;
366 366
            av_log(c->fc, AV_LOG_DEBUG, "volume %s, len %d\n", dref->volume, volume_len);
367 367

  
368
            url_fskip(pb, 12);
368
            avio_seek(pb, 12, SEEK_CUR);
369 369

  
370 370
            len = avio_r8(pb);
371 371
            len = FFMIN(len, 63);
......
373 373
            dref->filename[len] = 0;
374 374
            av_log(c->fc, AV_LOG_DEBUG, "filename %s, len %d\n", dref->filename, len);
375 375

  
376
            url_fskip(pb, 16);
376
            avio_seek(pb, 16, SEEK_CUR);
377 377

  
378 378
            /* read next level up_from_alias/down_to_target */
379 379
            dref->nlvl_from = avio_rb16(pb);
......
381 381
            av_log(c->fc, AV_LOG_DEBUG, "nlvl from %d, nlvl to %d\n",
382 382
                   dref->nlvl_from, dref->nlvl_to);
383 383

  
384
            url_fskip(pb, 16);
384
            avio_seek(pb, 16, SEEK_CUR);
385 385

  
386 386
            for (type = 0; type != -1 && url_ftell(pb) < next; ) {
387 387
                type = avio_rb16(pb);
......
416 416
                            dref->dir[j] = '/';
417 417
                    av_log(c->fc, AV_LOG_DEBUG, "dir %s\n", dref->dir);
418 418
                } else
419
                    url_fskip(pb, len);
419
                    avio_seek(pb, len, SEEK_CUR);
420 420
            }
421 421
        }
422 422
        avio_seek(pb, next, SEEK_SET);
......
663 663

  
664 664
    avio_rb16(pb); /* preferred volume */
665 665

  
666
    url_fskip(pb, 10); /* reserved */
666
    avio_seek(pb, 10, SEEK_CUR); /* reserved */
667 667

  
668
    url_fskip(pb, 36); /* display matrix */
668
    avio_seek(pb, 36, SEEK_CUR); /* display matrix */
669 669

  
670 670
    avio_rb32(pb); /* preview time */
671 671
    avio_rb32(pb); /* preview duration */
......
782 782
        if (mov_read_default(c, pb, atom) < 0)
783 783
            return -1;
784 784
    } else
785
        url_fskip(pb, atom.size);
785
        avio_seek(pb, atom.size, SEEK_CUR);
786 786
    return 0;
787 787
}
788 788

  
......
833 833
    if (!st->codec->extradata)
834 834
        return AVERROR(ENOMEM);
835 835
    st->codec->extradata_size = atom.size - 40;
836
    url_fskip(pb, 40);
836
    avio_seek(pb, 40, SEEK_CUR);
837 837
    avio_read(pb, st->codec->extradata, atom.size - 40);
838 838
    return 0;
839 839
}
......
945 945
             * in the MOV demuxer, patch welcome. */
946 946
        multiple_stsd:
947 947
            av_log(c->fc, AV_LOG_WARNING, "multiple fourcc not supported\n");
948
            url_fskip(pb, size - (url_ftell(pb) - start_pos));
948
            avio_seek(pb, size - (url_ftell(pb) - start_pos), SEEK_CUR);
949 949
            continue;
950 950
        }
951 951
        /* we cannot demux concatenated h264 streams because of different extradata */
......
1003 1003
                len = 31;
1004 1004
            mov_read_mac_string(c, pb, len, st->codec->codec_name, 32);
1005 1005
            if (len < 31)
1006
                url_fskip(pb, 31 - len);
1006
                avio_seek(pb, 31 - len, SEEK_CUR);
1007 1007
            /* codec_tag YV12 triggers an UV swap in rawdec.c */
1008 1008
            if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))
1009 1009
                st->codec->codec_tag=MKTAG('I', '4', '2', '0');
......
1174 1174
            st->codec->height = sc->height;
1175 1175
        } else {
1176 1176
            /* other codec type, just skip (rtp, mp4s, tmcd ...) */
1177
            url_fskip(pb, size - (url_ftell(pb) - start_pos));
1177
            avio_seek(pb, size - (url_ftell(pb) - start_pos), SEEK_CUR);
1178 1178
        }
1179 1179
        /* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */
1180 1180
        a.size = size - (url_ftell(pb) - start_pos);
......
1182 1182
            if (mov_read_default(c, pb, a) < 0)
1183 1183
                return -1;
1184 1184
        } else if (a.size > 0)
1185
            url_fskip(pb, a.size);
1185
            avio_seek(pb, a.size, SEEK_CUR);
1186 1186
    }
1187 1187

  
1188 1188
    if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
......
2078 2078
    if (atom.size < 8)
2079 2079
        return 0; /* continue */
2080 2080
    if (avio_rb32(pb) != 0) { /* 0 sized mdat atom... use the 'wide' atom size */
2081
        url_fskip(pb, atom.size - 4);
2081
        avio_seek(pb, atom.size - 4, SEEK_CUR);
2082 2082
        return 0;
2083 2083
    }
2084 2084
    atom.type = avio_rl32(pb);
2085 2085
    atom.size -= 8;
2086 2086
    if (atom.type != MKTAG('m','d','a','t')) {
2087
        url_fskip(pb, atom.size);
2087
        avio_seek(pb, atom.size, SEEK_CUR);
2088 2088
        return 0;
2089 2089
    }
2090 2090
    err = mov_read_mdat(c, pb, atom);
libavformat/mpc8.c
182 182
        avio_seek(pb, pos, SEEK_SET);
183 183
        break;
184 184
    default:
185
        url_fskip(pb, size);
185
        avio_seek(pb, size, SEEK_CUR);
186 186
    }
187 187
}
188 188

  
......
212 212
        return -1;
213 213
    }
214 214
    pos = url_ftell(pb);
215
    url_fskip(pb, 4); //CRC
215
    avio_seek(pb, 4, SEEK_CUR); //CRC
216 216
    c->ver = avio_r8(pb);
217 217
    if(c->ver != 8){
218 218
        av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
libavformat/mpeg.c
212 212
    ps_info_length = avio_rb16(pb);
213 213

  
214 214
    /* skip program_stream_info */
215
    url_fskip(pb, ps_info_length);
215
    avio_seek(pb, ps_info_length, SEEK_CUR);
216 216
    es_map_length = avio_rb16(pb);
217 217

  
218 218
    /* at least one es available? */
......
223 223
        /* remember mapping from stream id to stream type */
224 224
        m->psm_es_type[es_id] = type;
225 225
        /* skip program_stream_info */
226
        url_fskip(pb, es_info_length);
226
        avio_seek(pb, es_info_length, SEEK_CUR);
227 227
        es_map_length -= 4 + es_info_length;
228 228
    }
229 229
    avio_rb32(pb); /* crc32 */
......
264 264
    if (startcode == SYSTEM_HEADER_START_CODE)
265 265
        goto redo;
266 266
    if (startcode == PADDING_STREAM) {
267
        url_fskip(s->pb, avio_rb16(s->pb));
267
        avio_seek(s->pb, avio_rb16(s->pb), SEEK_CUR);
268 268
        goto redo;
269 269
    }
270 270
    if (startcode == PRIVATE_STREAM_2) {
......
281 281
            }
282 282
            m->sofdec -= !m->sofdec;
283 283
        }
284
        url_fskip(s->pb, len);
284
        avio_seek(s->pb, len, SEEK_CUR);
285 285
        goto redo;
286 286
    }
287 287
    if (startcode == PROGRAM_STREAM_MAP) {
......
359 359
                av_log(s, AV_LOG_WARNING, "pes_ext %X is invalid\n", pes_ext);
360 360
                pes_ext=skip=0;
361 361
            }
362
            url_fskip(s->pb, skip);
362
            avio_seek(s->pb, skip, SEEK_CUR);
363 363
            header_len -= skip;
364 364

  
365 365
            if (pes_ext & 0x01) { /* PES extension 2 */
......
375 375
        }
376 376
        if(header_len < 0)
377 377
            goto error_redo;
378
        url_fskip(s->pb, header_len);
378
        avio_seek(s->pb, header_len, SEEK_CUR);
379 379
    }
380 380
    else if( c!= 0xf )
381 381
        goto redo;
......
433 433

  
434 434
    if(startcode == 0x1bd) {
435 435
        dvdaudio_substream_type = avio_r8(s->pb);
436
        url_fskip(s->pb, 3);
436
        avio_seek(s->pb, 3, SEEK_CUR);
437 437
        len -= 4;
438 438
    }
439 439

  
......
525 525
    } else {
526 526
    skip:
527 527
        /* skip packet */
528
        url_fskip(s->pb, len);
528
        avio_seek(s->pb, len, SEEK_CUR);
529 529
        goto redo;
530 530
    }
531 531
    /* no stream found: add a new stream */
......
602 602
            dts != AV_NOPTS_VALUE) {
603 603
            break;
604 604
        }
605
        url_fskip(s->pb, len);
605
        avio_seek(s->pb, len, SEEK_CUR);
606 606
    }
607 607
#ifdef DEBUG_SEEK
608 608
    printf("pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n", pos, dts, dts / 90000.0);
libavformat/mpegts.c
1346 1346
        } else {
1347 1347
            skip = raw_packet_size - TS_PACKET_SIZE;
1348 1348
            if (skip > 0)
1349
                url_fskip(pb, skip);
1349
                avio_seek(pb, skip, SEEK_CUR);
1350 1350
            break;
1351 1351
        }
1352 1352
    }
libavformat/msnwc_tcp.c
104 104
    uint16_t keyframe;
105 105
    uint32_t size, timestamp;
106 106

  
107
    url_fskip(pb, 1); /* one byte has been read ahead */
108
    url_fskip(pb, 2);
109
    url_fskip(pb, 2);
107
    avio_seek(pb, 1, SEEK_CUR); /* one byte has been read ahead */
108
    avio_seek(pb, 2, SEEK_CUR);
109
    avio_seek(pb, 2, SEEK_CUR);
110 110
    keyframe = avio_rl16(pb);
111 111
    size = avio_rl32(pb);
112
    url_fskip(pb, 4);
113
    url_fskip(pb, 4);
112
    avio_seek(pb, 4, SEEK_CUR);
113
    avio_seek(pb, 4, SEEK_CUR);
114 114
    timestamp = avio_rl32(pb);
115 115

  
116 116
    if(!size || av_get_packet(pb, pkt, size) != size)
117 117
        return -1;
118 118

  
119
    url_fskip(pb, 1); /* Read ahead one byte of struct size like read_header */
119
    avio_seek(pb, 1, SEEK_CUR); /* Read ahead one byte of struct size like read_header */
120 120

  
121 121
    pkt->pts = timestamp;
122 122
    pkt->dts = timestamp;
libavformat/mtv.c
83 83
    AVStream        *st;
84 84
    unsigned int    audio_subsegments;
85 85

  
86
    url_fskip(pb, 3);
86
    avio_seek(pb, 3, SEEK_CUR);
87 87
    mtv->file_size         = avio_rl32(pb);
88 88
    mtv->segments          = avio_rl32(pb);
89
    url_fskip(pb, 32);
89
    avio_seek(pb, 32, SEEK_CUR);
90 90
    mtv->audio_identifier  = avio_rl24(pb);
91 91
    mtv->audio_br          = avio_rl16(pb);
92 92
    mtv->img_colorfmt      = avio_rl24(pb);
......
105 105
        mtv->img_height=mtv->img_segment_size / (mtv->img_bpp>>3)
106 106
                        / mtv->img_width;
107 107

  
108
    url_fskip(pb, 4);
108
    avio_seek(pb, 4, SEEK_CUR);
109 109
    audio_subsegments = avio_rl16(pb);
110 110
    mtv->full_segment_size =
111 111
        audio_subsegments * (MTV_AUDIO_PADDING_SIZE + MTV_ASUBCHUNK_DATA_SIZE) +
......
164 164

  
165 165
    if((url_ftell(pb) - s->data_offset + mtv->img_segment_size) % mtv->full_segment_size)
166 166
    {
167
        url_fskip(pb, MTV_AUDIO_PADDING_SIZE);
167
        avio_seek(pb, MTV_AUDIO_PADDING_SIZE, SEEK_CUR);
168 168

  
169 169
        ret = av_get_packet(pb, pkt, MTV_ASUBCHUNK_DATA_SIZE);
170 170
        if(ret < 0)
libavformat/mxfdec.c
262 262
        av_aes_init(mxf->aesc, s->key, 128, 1);
263 263
    }
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff