History

lavf: replace all uses of url_fskip with avio_seek

Anton Khirnov committed 15 years ago

Commit e356fc51 parent 6b4aa5d62 files · +299 −299Browse files

Unified · Split

62 files
  1. libavformat/aea.c +2 −2
  2. libavformat/aiffdec.c +3 −3
  3. libavformat/anm.c +8 −8
  4. libavformat/ape.c +1 −1
  5. libavformat/asfdec.c +15 −15
  6. libavformat/avidec.c +22 −22
  7. libavformat/avienc.c +3 −3
  8. libavformat/avs.c +2 −2
  9. libavformat/bfi.c +3 −3
  10. libavformat/bink.c +3 −3
  11. libavformat/c93.c +1 −1
  12. libavformat/cafdec.c +8 −8
  13. libavformat/dxa.c +2 −2
  14. libavformat/eacdata.c +1 −1
  15. libavformat/electronicarts.c +7 −7
  16. libavformat/ffmdec.c +1 −1
  17. libavformat/filmstripdec.c +2 −2
  18. libavformat/flvdec.c +9 −9
  19. libavformat/gxf.c +14 −14
  20. libavformat/id3v2.c +6 −6
  21. libavformat/iff.c +7 −7
  22. libavformat/ingenientdec.c +3 −3
  23. libavformat/iv8.c +1 −1
  24. libavformat/lmlm4.c +1 −1
  25. libavformat/lxfdec.c +3 −3
  26. libavformat/matroskadec.c +2 −2
  27. libavformat/mov.c +18 −18
  28. libavformat/mpc8.c +2 −2
  29. libavformat/mpeg.c +9 −9
  30. libavformat/mpegts.c +1 −1
  31. libavformat/msnwc_tcp.c +6 −6
  32. libavformat/mtv.c +4 −4
  33. libavformat/mxfdec.c +11 −11
  34. libavformat/ncdec.c +1 −1
  35. libavformat/nsvdec.c +1 −1
  36. libavformat/nutdec.c +1 −1
  37. libavformat/nuv.c +14 −14
  38. libavformat/pva.c +1 −1
  39. libavformat/qcp.c +7 −7
  40. libavformat/r3d.c +3 −3
  41. libavformat/rdt.c +3 −3
  42. libavformat/riff.c +2 −2
  43. libavformat/rl2.c +1 −1
  44. libavformat/rmdec.c +11 −11
  45. libavformat/rtpdec_asf.c +5 −5
  46. libavformat/rtpdec_qt.c +2 −2
  47. libavformat/sauce.c +2 −2
  48. libavformat/siff.c +5 −5
  49. libavformat/soxdec.c +3 −3
  50. libavformat/spdifdec.c +1 −1
  51. libavformat/swfdec.c +3 −3
  52. libavformat/tmv.c +1 −1
  53. libavformat/tta.c +3 −3
  54. libavformat/txd.c +1 −1
  55. libavformat/vc1test.c +1 −1
  56. libavformat/vocdec.c +4 −4
  57. libavformat/vqf.c +3 −3
  58. libavformat/wav.c +3 −3
  59. libavformat/wtv.c +29 −29
  60. libavformat/wv.c +3 −3
  61. libavformat/xa.c +2 −2
  62. libavformat/yop.c +2 −2
libavformat/aea.c+2−2
@@ -62,9 +62,9 @@ static int aea_read_header(AVFormatContext *s, · 61 unmodified lines
6262 return AVERROR(ENOMEM);
6363
6464 /* 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);
6666 st->codec->channels = avio_r8(s->pb);
67− url_fskip(s->pb, 1783);
67+ avio_seek(s->pb, 1783, SEEK_CUR);
6868
6969
7070 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
libavformat/aiffdec.c+3−3
@@ -70,7 +70,7 @@ static void get_meta(AVFormatContext *s, const char *key, int size) · 69 unmodified lines
7070 int res;
7171
7272 if (!str) {
73− url_fskip(s->pb, size);
73+ avio_seek(s->pb, size, SEEK_CUR);
7474 return;
7575 }
7676
@@ -242,7 +242,7 @@ static int aiff_read_header(AVFormatContext *s, · 165 unmodified lines
242242 av_log(s, AV_LOG_ERROR, "file is not seekable\n");
243243 return -1;
244244 }
245− url_fskip(pb, size - 8);
245+ avio_seek(pb, size - 8, SEEK_CUR);
246246 break;
247247 case MKTAG('w', 'a', 'v', 'e'):
248248 if ((uint64_t)size > (1<<30))
@@ -256,7 +256,7 @@ static int aiff_read_header(AVFormatContext *s, · 7 unmodified lines
256256 default: /* Jump */
257257 if (size & 1) /* Always even aligned */
258258 size++;
259− url_fskip (pb, size);
259+ avio_seek(pb, size, SEEK_CUR);
260260 }
261261 }
262262
libavformat/anm.c+8−8
@@ -83,7 +83,7 @@ static int read_header(AVFormatContext *s, · 82 unmodified lines
8383 AVStream *st;
8484 int i, ret;
8585
86− url_fskip(pb, 4); /* magic number */
86+ avio_seek(pb, 4, SEEK_CUR); /* magic number */
8787 if (avio_rl16(pb) != MAX_PAGES) {
8888 av_log_ask_for_sample(s, "max_pages != " AV_STRINGIFY(MAX_PAGES) "\n");
8989 return AVERROR_INVALIDDATA;
@@ -91,7 +91,7 @@ static int read_header(AVFormatContext *s, · 1 unmodified line
9191
9292 anm->nb_pages = avio_rl16(pb);
9393 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 */
9595 anm->page_table_offset = avio_rl16(pb);
9696 if (avio_rl32(pb) != ANIM_TAG)
9797 return AVERROR_INVALIDDATA;
@@ -107,13 +107,13 @@ static int read_header(AVFormatContext *s, · 9 unmodified lines
107107 st->codec->height = avio_rl16(pb);
108108 if (avio_r8(pb) != 0)
109109 goto invalid;
110− url_fskip(pb, 1); /* frame rate multiplier info */
110+ avio_seek(pb, 1, SEEK_CUR); /* frame rate multiplier info */
111111
112112 /* ignore last delta record (used for looping) */
113113 if (avio_r8(pb)) /* has_last_delta */
114114 anm->nb_records = FFMAX(anm->nb_records - 1, 0);
115115
116− url_fskip(pb, 1); /* last_delta_valid */
116+ avio_seek(pb, 1, SEEK_CUR); /* last_delta_valid */
117117
118118 if (avio_r8(pb) != 0)
119119 goto invalid;
@@ -121,15 +121,15 @@ static int read_header(AVFormatContext *s, · 1 unmodified line
121121 if (avio_r8(pb) != 1)
122122 goto invalid;
123123
124− url_fskip(pb, 1); /* other recs per frame */
124+ avio_seek(pb, 1, SEEK_CUR); /* other recs per frame */
125125
126126 if (avio_r8(pb) != 1)
127127 goto invalid;
128128
129− url_fskip(pb, 32); /* record_types */
129+ avio_seek(pb, 32, SEEK_CUR); /* record_types */
130130 st->nb_frames = avio_rl32(pb);
131131 av_set_pts_info(st, 64, 1, avio_rl16(pb));
132− url_fskip(pb, 58);
132+ avio_seek(pb, 58, SEEK_CUR);
133133
134134 /* color cycling and palette data */
135135 st->codec->extradata_size = 16*8 + 4*256;
@@ -193,7 +193,7 @@ repeat: · 57 unmodified lines
193193 /* parse page header */
194194 if (anm->record < 0) {
195195 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);
197197 anm->record = 0;
198198 }
199199
libavformat/ape.c+1−1
@@ -239,7 +239,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) · 238 unmodified lines
239239
240240 /* Skip any stored wav header */
241241 if (!(ape->formatflags & MAC_FORMAT_FLAG_CREATE_WAV_HEADER))
242− url_fskip(pb, ape->wavheaderlength);
242+ avio_seek(pb, ape->wavheaderlength, SEEK_CUR);
243243 }
244244
245245 if(ape->totalframes > UINT_MAX / sizeof(APEFrame)){
libavformat/asfdec.c+15−15
@@ -350,7 +350,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) · 349 unmodified lines
350350 avio_rl16(pb); /* panes */
351351 st->codec->bits_per_coded_sample = avio_rl16(pb); /* depth */
352352 tag1 = avio_rl32(pb);
353− url_fskip(pb, 20);
353+ avio_seek(pb, 20, SEEK_CUR);
354354 // av_log(s, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX);
355355 if (sizeX > 40) {
356356 st->codec->extradata_size = sizeX - 40;
@@ -388,7 +388,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) · 31 unmodified lines
388388 st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
389389 }
390390 pos2 = url_ftell(pb);
391− url_fskip(pb, size - (pos2 - pos1 + 24));
391+ avio_seek(pb, size - (pos2 - pos1 + 24), SEEK_CUR);
392392
393393 return 0;
394394 }
@@ -455,7 +455,7 @@ static int asf_read_content_desc(AVFormatContext *s, int64_t size) · 60 unmodified lines
455455 get_tag(s, "author" , 0, len2);
456456 get_tag(s, "copyright", 0, len3);
457457 get_tag(s, "comment" , 0, len4);
458− url_fskip(pb, len5);
458+ avio_seek(pb, len5, SEEK_CUR);
459459
460460 return 0;
461461 }
@@ -475,7 +475,7 @@ static int asf_read_ext_content_desc(AVFormatContext *s, int64_t size) · 13 unmodified lines
475475 if (name_len%2) // must be even, broken lavf versions wrote len-1
476476 name_len += 1;
477477 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);
479479 value_type = avio_rl16(pb);
480480 value_len = avio_rl16(pb);
481481 if (!value_type && value_len%2)
@@ -505,7 +505,7 @@ static int asf_read_language_list(AVFormatContext *s, int64_t size) · 23 unmodified lines
505505 char lang[6];
506506 unsigned int lang_len = avio_r8(pb);
507507 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);
509509 if (j < 128)
510510 av_strlcpy(asf->stream_languages[j], lang, sizeof(*asf->stream_languages));
511511 }
@@ -531,10 +531,10 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size) · 19 unmodified lines
531531 value_len= avio_rl32(pb);
532532
533533 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);
535535 //av_log(s, AV_LOG_ERROR, "%d %d %d %d %d <%s>\n", i, stream_num, name_len, value_type, value_len, name);
536536 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);
538538
539539 if(stream_num<128){
540540 if (!strcmp(name, "AspectRatioX")) asf->dar[stream_num].num= value_num;
@@ -571,7 +571,7 @@ static int asf_read_marker(AVFormatContext *s, int64_t size) · 30 unmodified lines
571571 avio_rl32(pb); // flags
572572 name_len = avio_rl32(pb); // name length
573573 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);
575575 ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name );
576576 }
577577
@@ -826,16 +826,16 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){ · 248 unmodified lines
826826 // for(i=0; i<asf->packet_replic_size-8; i++)
827827 // av_log(s, AV_LOG_DEBUG, "%02X ",avio_r8(pb));
828828 // av_log(s, AV_LOG_DEBUG, "\n");
829− url_fskip(pb, 10);
829+ avio_seek(pb, 10, SEEK_CUR);
830830 ts0= avio_rl64(pb);
831831 ts1= avio_rl64(pb);
832− url_fskip(pb, 12);
832+ avio_seek(pb, 12, SEEK_CUR);
833833 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);
835835 if(ts0!= -1) asf->packet_frag_timestamp= ts0/10000;
836836 else asf->packet_frag_timestamp= AV_NOPTS_VALUE;
837837 }else
838− url_fskip(pb, asf->packet_replic_size - 8);
838+ avio_seek(pb, asf->packet_replic_size - 8, SEEK_CUR);
839839 rsize += asf->packet_replic_size; // FIXME - check validity
840840 } else if (asf->packet_replic_size==1){
841841 // multipacket - frag_offset is beginning timestamp
@@ -895,7 +895,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk · 53 unmodified lines
895895 //printf("PacketLeftSize:%d Pad:%d Pos:%"PRId64"\n", asf->packet_size_left, asf->packet_padsize, url_ftell(pb));
896896 assert(ret>=0);
897897 /* fail safe */
898− url_fskip(pb, ret);
898+ avio_seek(pb, ret, SEEK_CUR);
899899
900900 asf->packet_pos= url_ftell(pb);
901901 if (asf->data_object_size != (uint64_t)-1 &&
@@ -914,7 +914,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk · 12 unmodified lines
914914 ) {
915915 asf->packet_time_start = 0;
916916 /* unhandled packet (should not happen) */
917− url_fskip(pb, asf->packet_frag_size);
917+ avio_seek(pb, asf->packet_frag_size, SEEK_CUR);
918918 asf->packet_size_left -= asf->packet_frag_size;
919919 if(asf->stream_index < 0)
920920 av_log(s, AV_LOG_ERROR, "ff asf skip %d (unknown stream)\n", asf->packet_frag_size);
@@ -934,7 +934,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk · 13 unmodified lines
934934 if (asf->packet_multi_size < asf->packet_obj_size)
935935 {
936936 asf->packet_time_start = 0;
937− url_fskip(pb, asf->packet_multi_size);
937+ avio_seek(pb, asf->packet_multi_size, SEEK_CUR);
938938 asf->packet_size_left -= asf->packet_multi_size;
939939 continue;
940940 }
libavformat/avidec.c+22−22
@@ -321,12 +321,12 @@ static void avi_read_nikon(AVFormatContext *s, uint64_t end) · 320 unmodified lines
321321 }
322322 if (name)
323323 av_metadata_set2(&s->metadata, name, buffer, 0);
324− url_fskip(s->pb, size);
324+ avio_seek(s->pb, size, SEEK_CUR);
325325 }
326326 break;
327327 }
328328 default:
329− url_fskip(s->pb, size);
329+ avio_seek(s->pb, size, SEEK_CUR);
330330 break;
331331 }
332332 }
@@ -392,13 +392,13 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 59 unmodified lines
392392 unsigned char date[64] = {0};
393393 size += (size & 1);
394394 size -= avio_read(pb, date, FFMIN(size, sizeof(date)-1));
395− url_fskip(pb, size);
395+ avio_seek(pb, size, SEEK_CUR);
396396 avi_metadata_creation_time(&s->metadata, date);
397397 break;
398398 }
399399 case MKTAG('d', 'm', 'l', 'h'):
400400 avi->is_odml = 1;
401− url_fskip(pb, size + (size & 1));
401+ avio_seek(pb, size + (size & 1), SEEK_CUR);
402402 break;
403403 case MKTAG('a', 'm', 'v', 'h'):
404404 amv_file_format=1;
@@ -410,13 +410,13 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines
410410 avio_rl32(pb);
411411 avi->non_interleaved |= avio_rl32(pb) & AVIF_MUSTUSEINDEX;
412412
413− url_fskip(pb, 2 * 4);
413+ avio_seek(pb, 2 * 4, SEEK_CUR);
414414 avio_rl32(pb);
415415 avio_rl32(pb);
416416 avih_width=avio_rl32(pb);
417417 avih_height=avio_rl32(pb);
418418
419− url_fskip(pb, size - 10 * 4);
419+ avio_seek(pb, size - 10 * 4, SEEK_CUR);
420420 break;
421421 case MKTAG('s', 't', 'r', 'h'):
422422 /* stream header */
@@ -425,7 +425,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 2 unmodified lines
425425 handler = avio_rl32(pb); /* codec tag */
426426
427427 if(tag1 == MKTAG('p', 'a', 'd', 's')){
428− url_fskip(pb, size - 8);
428+ avio_seek(pb, size - 8, SEEK_CUR);
429429 break;
430430 }else{
431431 stream_index++;
@@ -469,10 +469,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 37 unmodified lines
469469 goto fail;
470470 }
471471 s->streams[0]->priv_data = ast;
472− url_fskip(pb, 3 * 4);
472+ avio_seek(pb, 3 * 4, SEEK_CUR);
473473 ast->scale = avio_rl32(pb);
474474 ast->rate = avio_rl32(pb);
475− url_fskip(pb, 4); /* start time */
475+ avio_seek(pb, 4, SEEK_CUR); /* start time */
476476
477477 dv_dur = avio_rl32(pb);
478478 if (ast->scale > 0 && ast->rate > 0 && dv_dur > 0) {
@@ -485,7 +485,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines
485485 */
486486
487487 stream_index = s->nb_streams - 1;
488− url_fskip(pb, size - 9*4);
488+ avio_seek(pb, size - 9*4, SEEK_CUR);
489489 break;
490490 }
491491
@@ -542,12 +542,12 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 50 unmodified lines
542542 if(ast->sample_size == 0)
543543 st->duration = st->nb_frames;
544544 ast->frame_offset= ast->cum_len;
545− url_fskip(pb, size - 12 * 4);
545+ avio_seek(pb, size - 12 * 4, SEEK_CUR);
546546 break;
547547 case MKTAG('s', 't', 'r', 'f'):
548548 /* stream header */
549549 if (stream_index >= (unsigned)s->nb_streams || avi->dv_demux) {
550− url_fskip(pb, size);
550+ avio_seek(pb, size, SEEK_CUR);
551551 } else {
552552 uint64_t cur_pos = url_ftell(pb);
553553 if (cur_pos < list_end)
@@ -560,7 +560,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines
560560 st->codec->height=avih_height;
561561 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
562562 st->codec->codec_id = CODEC_ID_AMV;
563− url_fskip(pb, size);
563+ avio_seek(pb, size, SEEK_CUR);
564564 break;
565565 }
566566 tag1 = ff_get_bmp_header(pb, st);
@@ -620,7 +620,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 53 unmodified lines
620620 }
621621 st->codec->height= FFABS(st->codec->height);
622622
623−// url_fskip(pb, size - 5 * 4);
623+// avio_seek(pb, size - 5 * 4, SEEK_CUR);
624624 break;
625625 case AVMEDIA_TYPE_AUDIO:
626626 ff_get_wav_header(pb, st->codec, size);
@@ -630,7 +630,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 3 unmodified lines
630630 ast->sample_size= st->codec->block_align;
631631 }
632632 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);
634634 /* Force parsing as several audio frames can be in
635635 * one packet and timestamps refer to packet start. */
636636 st->need_parsing = AVSTREAM_PARSE_TIMESTAMPS;
@@ -658,7 +658,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 21 unmodified lines
658658 st->codec->codec_type = AVMEDIA_TYPE_DATA;
659659 st->codec->codec_id= CODEC_ID_NONE;
660660 st->codec->codec_tag= 0;
661− url_fskip(pb, size);
661+ avio_seek(pb, size, SEEK_CUR);
662662 break;
663663 }
664664 }
@@ -710,7 +710,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 45 unmodified lines
710710 }
711711 /* skip tag */
712712 size += (size & 1);
713− url_fskip(pb, size);
713+ avio_seek(pb, size, SEEK_CUR);
714714 break;
715715 }
716716 }
@@ -762,7 +762,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) { · 45 unmodified lines
762762 goto error;
763763
764764 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);
766766 if (*desc)
767767 av_metadata_set2(&st->metadata, "title", desc, 0);
768768
@@ -1008,14 +1008,14 @@ resync: · 239 unmodified lines
10081008 //parse JUNK
10091009 ||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K')
10101010 ||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){
1011− url_fskip(pb, size);
1011+ avio_seek(pb, size, SEEK_CUR);
10121012 //av_log(s, AV_LOG_DEBUG, "SKIP\n");
10131013 goto resync;
10141014 }
10151015
10161016 //parse stray LIST
10171017 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);
10191019 goto resync;
10201020 }
10211021
@@ -1026,7 +1026,7 @@ resync: · 4 unmodified lines
10261026
10271027 //detect ##ix chunk and skip
10281028 if(d[2] == 'i' && d[3] == 'x' && n < s->nb_streams){
1029− url_fskip(pb, size);
1029+ avio_seek(pb, size, SEEK_CUR);
10301030 goto resync;
10311031 }
10321032
@@ -1060,7 +1060,7 @@ resync: · 27 unmodified lines
10601060 /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering
10611061 || st->discard >= AVDISCARD_ALL){
10621062 ast->frame_offset += get_duration(ast, size);
1063− url_fskip(pb, size);
1063+ avio_seek(pb, size, SEEK_CUR);
10641064 goto resync;
10651065 }
10661066
libavformat/avienc.c+3−3
@@ -444,9 +444,9 @@ static int avi_write_ix(AVFormatContext *s) · 443 unmodified lines
444444 /* Updating one entry in the AVI OpenDML master index */
445445 avio_seek(pb, avist->indexes.indx_start - 8, SEEK_SET);
446446 ffio_wfourcc(pb, "indx"); /* enabling this entry */
447− url_fskip(pb, 8);
447+ avio_seek(pb, 8, SEEK_CUR);
448448 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);
450450 avio_wl64(pb, ix); /* qwOffset */
451451 avio_wl32(pb, pos - ix); /* dwSize */
452452 avio_wl32(pb, avist->indexes.entry); /* dwDuration */
@@ -603,7 +603,7 @@ static int avi_write_trailer(AVFormatContext *s) · 150 unmodified lines
603603 file_size = url_ftell(pb);
604604 avio_seek(pb, avi->odml_list - 8, SEEK_SET);
605605 ffio_wfourcc(pb, "LIST"); /* Making this AVI OpenDML one */
606− url_fskip(pb, 16);
606+ avio_seek(pb, 16, SEEK_CUR);
607607
608608 for (n=nb_frames=0;n<s->nb_streams;n++) {
609609 AVCodecContext *stream = s->streams[n]->codec;
libavformat/avs.c+2−2
@@ -61,7 +61,7 @@ static int avs_read_header(AVFormatContext * s, AVFormatParameters * ap) · 60 unmodified lines
6161
6262 s->ctx_flags |= AVFMTCTX_NOHEADER;
6363
64− url_fskip(s->pb, 4);
64+ avio_seek(s->pb, 4, SEEK_CUR);
6565 avs->width = avio_rl16(s->pb);
6666 avs->height = avio_rl16(s->pb);
6767 avs->bits_per_sample = avio_rl16(s->pb);
@@ -204,7 +204,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) · 136 unmodified lines
204204 break;
205205
206206 default:
207− url_fskip(s->pb, size - 4);
207+ avio_seek(s->pb, size - 4, SEEK_CUR);
208208 }
209209 }
210210 }
libavformat/bfi.c+3−3
@@ -65,19 +65,19 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap) · 64 unmodified lines
6565 return AVERROR(ENOMEM);
6666
6767 /* Set the total number of frames. */
68− url_fskip(pb, 8);
68+ avio_seek(pb, 8, SEEK_CUR);
6969 chunk_header = avio_rl32(pb);
7070 bfi->nframes = avio_rl32(pb);
7171 avio_rl32(pb);
7272 avio_rl32(pb);
7373 avio_rl32(pb);
7474 fps = avio_rl32(pb);
75− url_fskip(pb, 12);
75+ avio_seek(pb, 12, SEEK_CUR);
7676 vstream->codec->width = avio_rl32(pb);
7777 vstream->codec->height = avio_rl32(pb);
7878
7979 /*Load the palette to extradata */
80− url_fskip(pb, 8);
80+ avio_seek(pb, 8, SEEK_CUR);
8181 vstream->codec->extradata = av_malloc(768);
8282 vstream->codec->extradata_size = 768;
8383 avio_read(pb, vstream->codec->extradata,
libavformat/bink.c+3−3
@@ -98,7 +98,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 97 unmodified lines
9898 return AVERROR(EIO);
9999 }
100100
101− url_fskip(pb, 4);
101+ avio_seek(pb, 4, SEEK_CUR);
102102
103103 vst->codec->width = avio_rl32(pb);
104104 vst->codec->height = avio_rl32(pb);
@@ -127,7 +127,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 22 unmodified lines
127127 }
128128
129129 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);
131131
132132 for (i = 0; i < bink->num_audio_tracks; i++) {
133133 ast = av_new_stream(s, 1);
@@ -169,7 +169,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 35 unmodified lines
169169 keyframe ? AVINDEX_KEYFRAME : 0);
170170 }
171171
172− url_fskip(pb, 4);
172+ avio_seek(pb, 4, SEEK_CUR);
173173
174174 bink->current_track = -1;
175175 return 0;
libavformat/c93.c+1−1
@@ -122,7 +122,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) · 121 unmodified lines
122122 return AVERROR(ENOMEM);
123123 c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
124124 }
125− url_fskip(pb, 26); /* VOC header */
125+ avio_seek(pb, 26, SEEK_CUR); /* VOC header */
126126 ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);
127127 if (ret > 0) {
128128 pkt->stream_index = 1;
libavformat/cafdec.c+8−8
@@ -114,22 +114,22 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size) · 113 unmodified lines
114114 av_log(s, AV_LOG_ERROR, "invalid AAC magic cookie\n");
115115 return AVERROR_INVALIDDATA;
116116 }
117− url_fskip(pb, skip);
117+ avio_seek(pb, skip, SEEK_CUR);
118118 } else if (st->codec->codec_id == CODEC_ID_ALAC) {
119119 #define ALAC_PREAMBLE 12
120120 #define ALAC_HEADER 36
121121 if (size < ALAC_PREAMBLE + ALAC_HEADER) {
122122 av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n");
123− url_fskip(pb, size);
123+ avio_seek(pb, size, SEEK_CUR);
124124 return AVERROR_INVALIDDATA;
125125 }
126− url_fskip(pb, ALAC_PREAMBLE);
126+ avio_seek(pb, ALAC_PREAMBLE, SEEK_CUR);
127127 st->codec->extradata = av_mallocz(ALAC_HEADER + FF_INPUT_BUFFER_PADDING_SIZE);
128128 if (!st->codec->extradata)
129129 return AVERROR(ENOMEM);
130130 avio_read(pb, st->codec->extradata, ALAC_HEADER);
131131 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);
133133 } else {
134134 st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
135135 if (!st->codec->extradata)
@@ -201,7 +201,7 @@ static int read_header(AVFormatContext *s, · 65 unmodified lines
201201 int found_data, ret;
202202 int64_t size;
203203
204− url_fskip(pb, 8); /* magic, version, file flags */
204+ avio_seek(pb, 8, SEEK_CUR); /* magic, version, file flags */
205205
206206 /* audio description chunk */
207207 if (avio_rb32(pb) != MKBETAG('d','e','s','c')) {
@@ -233,11 +233,11 @@ static int read_header(AVFormatContext *s, · 25 unmodified lines
233233
234234 switch (tag) {
235235 case MKBETAG('d','a','t','a'):
236− url_fskip(pb, 4); /* edit count */
236+ avio_seek(pb, 4, SEEK_CUR); /* edit count */
237237 caf->data_start = url_ftell(pb);
238238 caf->data_size = size < 0 ? -1 : size - 4;
239239 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);
241241 found_data = 1;
242242 break;
243243
@@ -265,7 +265,7 @@ static int read_header(AVFormatContext *s, · 21 unmodified lines
265265 case MKBETAG('f','r','e','e'):
266266 if (size < 0)
267267 return AVERROR_INVALIDDATA;
268− url_fskip(pb, size);
268+ avio_seek(pb, size, SEEK_CUR);
269269 break;
270270 }
271271 }
libavformat/dxa.c+2−2
@@ -96,7 +96,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) · 95 unmodified lines
9696 c->has_sound = 1;
9797 size = avio_rb32(pb);
9898 c->vidpos = url_ftell(pb) + size;
99− url_fskip(pb, 16);
99+ avio_seek(pb, 16, SEEK_CUR);
100100 fsize = avio_rl32(pb);
101101
102102 ast = av_new_stream(s, 0);
@@ -108,7 +108,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines
108108 tag = avio_rl32(pb);
109109 fsize = avio_rl32(pb);
110110 if(tag == MKTAG('d', 'a', 't', 'a')) break;
111− url_fskip(pb, fsize);
111+ avio_seek(pb, fsize, SEEK_CUR);
112112 }
113113 c->bpc = (fsize + c->frames - 1) / c->frames;
114114 if(ast->codec->block_align)
libavformat/eacdata.c+1−1
@@ -62,7 +62,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap) · 61 unmodified lines
6262 };
6363
6464 sample_rate = avio_rb16(pb);
65− url_fskip(pb, 12);
65+ avio_seek(pb, 12, SEEK_CUR);
6666
6767 st = av_new_stream(s, 0);
6868 if (!st)
libavformat/electronicarts.c+7−7
@@ -222,7 +222,7 @@ static int process_audio_header_eacs(AVFormatContext *s) · 221 unmodified lines
222222 ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */
223223 ea->num_channels = avio_r8(pb);
224224 compression_type = avio_r8(pb);
225− url_fskip(pb, 13);
225+ avio_seek(pb, 13, SEEK_CUR);
226226
227227 switch (compression_type) {
228228 case 0:
@@ -261,7 +261,7 @@ static int process_video_header_mdec(AVFormatContext *s) · 32 unmodified lines
261261 {
262262 EaDemuxContext *ea = s->priv_data;
263263 AVIOContext *pb = s->pb;
264− url_fskip(pb, 4);
264+ avio_seek(pb, 4, SEEK_CUR);
265265 ea->width = avio_rl16(pb);
266266 ea->height = avio_rl16(pb);
267267 ea->time_base = (AVRational){1,15};
@@ -274,7 +274,7 @@ static int process_video_header_vp6(AVFormatContext *s) · 6 unmodified lines
274274 EaDemuxContext *ea = s->priv_data;
275275 AVIOContext *pb = s->pb;
276276
277− url_fskip(pb, 16);
277+ avio_seek(pb, 16, SEEK_CUR);
278278 ea->time_base.den = avio_rl32(pb);
279279 ea->time_base.num = avio_rl32(pb);
280280 ea->video_codec = CODEC_ID_VP6;
@@ -316,7 +316,7 @@ static int process_ea_header(AVFormatContext *s) { · 35 unmodified lines
316316 case SHEN_TAG :
317317 blockid = avio_rl32(pb);
318318 if (blockid == GSTR_TAG) {
319− url_fskip(pb, 4);
319+ avio_seek(pb, 4, SEEK_CUR);
320320 } else if ((blockid & 0xFFFF)!=PT00_TAG) {
321321 av_log (s, AV_LOG_ERROR, "unknown SCHl headerid\n");
322322 return 0;
@@ -474,19 +474,19 @@ static int ea_read_packet(AVFormatContext *s, · 151 unmodified lines
474474 /* audio data */
475475 case ISNh_TAG:
476476 /* header chunk also contains data; skip over the header portion*/
477− url_fskip(pb, 32);
477+ avio_seek(pb, 32, SEEK_CUR);
478478 chunk_size -= 32;
479479 case ISNd_TAG:
480480 case SCDl_TAG:
481481 case SNDC_TAG:
482482 case SDEN_TAG:
483483 if (!ea->audio_codec) {
484− url_fskip(pb, chunk_size);
484+ avio_seek(pb, chunk_size, SEEK_CUR);
485485 break;
486486 } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||
487487 ea->audio_codec == CODEC_ID_MP3) {
488488 num_samples = avio_rl32(pb);
489− url_fskip(pb, 8);
489+ avio_seek(pb, 8, SEEK_CUR);
490490 chunk_size -= 12;
491491 }
492492 ret = av_get_packet(pb, pkt, chunk_size);
libavformat/ffmdec.c+1−1
@@ -187,7 +187,7 @@ static int64_t get_dts(AVFormatContext *s, int64_t pos) · 186 unmodified lines
187187 int64_t dts;
188188
189189 ffm_seek1(s, pos);
190− url_fskip(pb, 4);
190+ avio_seek(pb, 4, SEEK_CUR);
191191 dts = avio_rb64(pb);
192192 #ifdef DEBUG_SEEK
193193 av_log(s, AV_LOG_DEBUG, "dts=%0.6f\n", dts / 1000000.0);
libavformat/filmstripdec.c+2−2
@@ -59,7 +59,7 @@ static int read_header(AVFormatContext *s, · 58 unmodified lines
5959 return AVERROR_INVALIDDATA;
6060 }
6161
62− url_fskip(pb, 2);
62+ avio_seek(pb, 2, SEEK_CUR);
6363 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
6464 st->codec->codec_id = CODEC_ID_RAWVIDEO;
6565 st->codec->pix_fmt = PIX_FMT_RGBA;
@@ -84,7 +84,7 @@ static int read_packet(AVFormatContext *s, · 18 unmodified lines
8484 return AVERROR(EIO);
8585 pkt->dts = url_ftell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);
8686 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);
8888 if (pkt->size < 0)
8989 return pkt->size;
9090 pkt->flags |= AV_PKT_FLAG_KEY;
libavformat/flvdec.c+9−9
@@ -113,7 +113,7 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co · 112 unmodified lines
113113 static int amf_get_string(AVIOContext *ioc, char *buffer, int buffsize) {
114114 int length = avio_rb16(ioc);
115115 if(length >= buffsize) {
116− url_fskip(ioc, length);
116+ avio_seek(ioc, length, SEEK_CUR);
117117 return -1;
118118 }
119119
@@ -149,7 +149,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst · 29 unmodified lines
149149 unsigned int keylen;
150150
151151 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
153153 if(amf_parse_object(s, NULL, NULL, NULL, max_pos, depth + 1) < 0)
154154 return -1; //if we couldn't skip, bomb out.
155155 }
@@ -162,7 +162,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst · 6 unmodified lines
162162 case AMF_DATA_TYPE_UNSUPPORTED:
163163 break; //these take up no additional space
164164 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
166166 while(url_ftell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) {
167167 //this is the only case in which we would want a nested parse to not skip over the object
168168 if(amf_parse_object(s, astream, vstream, str_val, max_pos, depth + 1) < 0)
@@ -182,7 +182,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst · 13 unmodified lines
182182 }
183183 break;
184184 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)
186186 break;
187187 default: //unsupported type, we couldn't skip
188188 return -1;
@@ -254,7 +254,7 @@ static int flv_read_header(AVFormatContext *s, · 65 unmodified lines
254254 {
255255 int offset, flags;
256256
257− url_fskip(s->pb, 4);
257+ avio_seek(s->pb, 4, SEEK_CUR);
258258 flags = avio_r8(s->pb);
259259 /* old flvtool cleared this field */
260260 /* FIXME: better fix needed */
@@ -278,7 +278,7 @@ static int flv_read_header(AVFormatContext *s, · 17 unmodified lines
278278
279279 offset = avio_rb32(s->pb);
280280 avio_seek(s->pb, offset, SEEK_SET);
281− url_fskip(s->pb, 4);
281+ avio_seek(s->pb, 4, SEEK_CUR);
282282
283283 s->start_time = 0;
284284
@@ -304,7 +304,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 19 unmodified lines
304304 int64_t dts, pts = AV_NOPTS_VALUE;
305305 AVStream *st = NULL;
306306
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 */
308308 pos = url_ftell(s->pb);
309309 type = avio_r8(s->pb);
310310 size = avio_rb24(s->pb);
@@ -313,7 +313,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 2 unmodified lines
313313 // av_log(s, AV_LOG_DEBUG, "type:%d, size:%d, dts:%d\n", type, size, dts);
314314 if (url_feof(s->pb))
315315 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 */
317317 flags = 0;
318318
319319 if(size == 0)
@@ -454,7 +454,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 134 unmodified lines
454454 pkt->flags |= AV_PKT_FLAG_KEY;
455455
456456 leave:
457− url_fskip(s->pb, 4);
457+ avio_seek(s->pb, 4, SEEK_CUR);
458458 return ret;
459459 }
460460
libavformat/gxf.c+14−14
@@ -174,7 +174,7 @@ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info · 173 unmodified lines
174174 else if (tag == MAT_LAST_FIELD)
175175 si->last_field = value;
176176 } else
177− url_fskip(pb, tlen);
177+ avio_seek(pb, tlen, SEEK_CUR);
178178 }
179179 }
180180
@@ -223,7 +223,7 @@ static void gxf_track_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si · 42 unmodified lines
223223 else if (tag == TRACK_FPF && (value == 1 || value == 2))
224224 si->fields_per_frame = value;
225225 } else
226− url_fskip(pb, tlen);
226+ avio_seek(pb, tlen, SEEK_CUR);
227227 }
228228 }
229229
@@ -238,7 +238,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) { · 8 unmodified lines
238238 int i;
239239 pkt_len -= 8;
240240 if (s->flags & AVFMT_FLAG_IGNIDX) {
241− url_fskip(pb, pkt_len);
241+ avio_seek(pb, pkt_len, SEEK_CUR);
242242 return;
243243 }
244244 if (map_cnt > 1000) {
@@ -247,7 +247,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) { · 2 unmodified lines
247247 }
248248 if (pkt_len < 4 * map_cnt) {
249249 av_log(s, AV_LOG_ERROR, "invalid index length\n");
250− url_fskip(pb, pkt_len);
250+ avio_seek(pb, pkt_len, SEEK_CUR);
251251 return;
252252 }
253253 pkt_len -= 4 * map_cnt;
@@ -255,7 +255,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) { · 1 unmodified line
255255 for (i = 0; i < map_cnt; i++)
256256 av_add_index_entry(st, (uint64_t)avio_rl32(pb) * 1024,
257257 i * (uint64_t)fields_per_map + 1, 0, 0, 0);
258− url_fskip(pb, pkt_len);
258+ avio_seek(pb, pkt_len, SEEK_CUR);
259259 }
260260
261261 static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
@@ -283,7 +283,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { · 21 unmodified lines
283283 }
284284 map_len -= len;
285285 gxf_material_tags(pb, &len, &si);
286− url_fskip(pb, len);
286+ avio_seek(pb, len, SEEK_CUR);
287287 map_len -= 2;
288288 len = avio_rb16(pb); // length of track description
289289 if (len > map_len) {
@@ -301,7 +301,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { · 11 unmodified lines
301301 track_len = avio_rb16(pb);
302302 len -= track_len;
303303 gxf_track_tags(pb, &track_len, &si);
304− url_fskip(pb, track_len);
304+ avio_seek(pb, track_len, SEEK_CUR);
305305 if (!(track_type & 0x80)) {
306306 av_log(s, AV_LOG_ERROR, "invalid track type %x\n", track_type);
307307 continue;
@@ -326,7 +326,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { · 18 unmodified lines
326326 if (len < 0)
327327 av_log(s, AV_LOG_ERROR, "invalid track description length specified\n");
328328 if (map_len)
329− url_fskip(pb, map_len);
329+ avio_seek(pb, map_len, SEEK_CUR);
330330 if (!parse_packet_header(pb, &pkt_type, &len)) {
331331 av_log(s, AV_LOG_ERROR, "sync lost in header\n");
332332 return -1;
@@ -342,8 +342,8 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { · 9 unmodified lines
342342 if (len >= 0x39) {
343343 AVRational fps;
344344 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
347347 fps = fps_umf2avr(avio_rl32(pb));
348348 if (!main_timebase.num || !main_timebase.den) {
349349 // this may not always be correct, but simply the best we can get
@@ -354,7 +354,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { · 4 unmodified lines
354354 av_log(s, AV_LOG_INFO, "UMF packet too short\n");
355355 } else
356356 av_log(s, AV_LOG_INFO, "UMF packet missing\n");
357− url_fskip(pb, len);
357+ avio_seek(pb, len, SEEK_CUR);
358358 // set a fallback value, 60000/1001 is specified for audio-only files
359359 // so use that regardless of why we do not know the video frame rate.
360360 if (!main_timebase.num || !main_timebase.den)
@@ -437,7 +437,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { · 76 unmodified lines
437437 continue;
438438 }
439439 if (pkt_type != PKT_MEDIA) {
440− url_fskip(pb, pkt_len);
440+ avio_seek(pb, pkt_len, SEEK_CUR);
441441 continue;
442442 }
443443 if (pkt_len < 16) {
@@ -462,7 +462,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { · 18 unmodified lines
462462 int last = field_info & 0xffff; // last is exclusive
463463 int bps = av_get_bits_per_sample(st->codec->codec_id)>>3;
464464 if (first <= last && last*bps <= pkt_len) {
465− url_fskip(pb, first*bps);
465+ avio_seek(pb, first*bps, SEEK_CUR);
466466 skip = pkt_len - last*bps;
467467 pkt_len = (last-first)*bps;
468468 } else
@@ -470,7 +470,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { · 1 unmodified line
470470 }
471471 ret = av_get_packet(pb, pkt, pkt_len);
472472 if (skip)
473− url_fskip(pb, skip);
473+ avio_seek(pb, skip, SEEK_CUR);
474474 pkt->stream_index = stream_index;
475475 pkt->dts = field_nr;
476476 return ret;
libavformat/id3v2.c+6−6
@@ -171,7 +171,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t · 170 unmodified lines
171171 unsync = flags & 0x80;
172172
173173 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);
175175
176176 while (len >= taghdrlen) {
177177 unsigned int tflags;
@@ -205,7 +205,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t · 27 unmodified lines
205205
206206 if (tflags & (ID3v2_FLAG_ENCRYPTION | ID3v2_FLAG_COMPRESSION)) {
207207 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);
209209 } else if (tag[0] == 'T') {
210210 if (unsync || tunsync) {
211211 int i, j;
@@ -226,7 +226,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t · 14 unmodified lines
226226 else if (!tag[0]) {
227227 if (tag[1])
228228 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);
230230 break;
231231 }
232232 /* Skip to end of tag */
@@ -235,17 +235,17 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t · 2 unmodified lines
235235
236236 if (len > 0) {
237237 /* Skip padding */
238− url_fskip(s->pb, len);
238+ avio_seek(s->pb, len, SEEK_CUR);
239239 }
240240 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);
242242
243243 av_free(buffer);
244244 return;
245245
246246 error:
247247 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);
249249 av_free(buffer);
250250 }
251251
libavformat/iff.c+7−7
@@ -134,7 +134,7 @@ static int iff_read_header(AVFormatContext *s, · 133 unmodified lines
134134 return AVERROR(ENOMEM);
135135
136136 st->codec->channels = 1;
137− url_fskip(pb, 8);
137+ avio_seek(pb, 8, SEEK_CUR);
138138 // codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content
139139 st->codec->codec_tag = avio_rl32(pb);
140140
@@ -152,10 +152,10 @@ static int iff_read_header(AVFormatContext *s, · 11 unmodified lines
152152
153153 if (data_size < 14)
154154 return AVERROR_INVALIDDATA;
155− url_fskip(pb, 12);
155+ avio_seek(pb, 12, SEEK_CUR);
156156 st->codec->sample_rate = avio_rb16(pb);
157157 if (data_size >= 16) {
158− url_fskip(pb, 1);
158+ avio_seek(pb, 1, SEEK_CUR);
159159 compression = avio_r8(pb);
160160 }
161161 break;
@@ -186,14 +186,14 @@ static int iff_read_header(AVFormatContext *s, · 24 unmodified lines
186186 return AVERROR_INVALIDDATA;
187187 st->codec->width = avio_rb16(pb);
188188 st->codec->height = avio_rb16(pb);
189− url_fskip(pb, 4); // x, y offset
189+ avio_seek(pb, 4, SEEK_CUR); // x, y offset
190190 st->codec->bits_per_coded_sample = avio_r8(pb);
191191 if (data_size >= 11) {
192− url_fskip(pb, 1); // masking
192+ avio_seek(pb, 1, SEEK_CUR); // masking
193193 compression = avio_r8(pb);
194194 }
195195 if (data_size >= 16) {
196− url_fskip(pb, 3); // paddding, transparent
196+ avio_seek(pb, 3, SEEK_CUR); // paddding, transparent
197197 st->sample_aspect_ratio.num = avio_r8(pb);
198198 st->sample_aspect_ratio.den = avio_r8(pb);
199199 }
@@ -223,7 +223,7 @@ static int iff_read_header(AVFormatContext *s, · 23 unmodified lines
223223 return res;
224224 }
225225 }
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);
227227 }
228228
229229 avio_seek(pb, iff->body_pos, SEEK_SET);
libavformat/ingenientdec.c+3−3
@@ -35,11 +35,11 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) · 34 unmodified lines
3535 w = avio_rl16(s->pb);
3636 h = avio_rl16(s->pb);
3737
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);
4040 unk1 = avio_rl16(s->pb);
4141 unk2 = avio_rl16(s->pb);
42− url_fskip(s->pb, 22); // ASCII timestamp
42+ avio_seek(s->pb, 22, SEEK_CUR); // ASCII timestamp
4343
4444 av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n",
4545 size, w, h, unk1, unk2);
libavformat/iv8.c+1−1
@@ -70,7 +70,7 @@ retry: · 69 unmodified lines
7070 return -1;
7171
7272 if(type==258){
73− url_fskip(s->pb, size);
73+ avio_seek(s->pb, size, SEEK_CUR);
7474 goto retry;
7575 }
7676
libavformat/lmlm4.c+1−1
@@ -100,7 +100,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) { · 99 unmodified lines
100100 if ((ret = av_get_packet(pb, pkt, frame_size)) <= 0)
101101 return AVERROR(EIO);
102102
103− url_fskip(pb, padding);
103+ avio_seek(pb, padding, SEEK_CUR);
104104
105105 switch (frame_type) {
106106 case LMLM4_I_FRAME:
libavformat/lxfdec.c+3−3
@@ -137,8 +137,8 @@ static int get_packet_header(AVFormatContext *s, uint8_t *header, uint32_t *form · 136 unmodified lines
137137 case 0:
138138 //video
139139 //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);
142142 break;
143143 case 1:
144144 //audio
@@ -255,7 +255,7 @@ static int lxf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 110 unmodified lines
255255
256256 if (format == 1) {
257257 //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);
259259 }
260260
261261 return 0;
libavformat/matroskadec.c+2−2
@@ -1393,10 +1393,10 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 1392 unmodified lines
13931393 int flavor;
13941394 ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size,
13951395 0, NULL, NULL, NULL, NULL);
1396− url_fskip(&b, 22);
1396+ avio_seek(&b, 22, SEEK_CUR);
13971397 flavor = avio_rb16(&b);
13981398 track->audio.coded_framesize = avio_rb32(&b);
1399− url_fskip(&b, 12);
1399+ avio_seek(&b, 12, SEEK_CUR);
14001400 track->audio.sub_packet_h = avio_rb16(&b);
14011401 track->audio.frame_size = avio_rb16(&b);
14021402 track->audio.sub_packet_size = avio_rb16(&b);
libavformat/mov.c+18−18
@@ -296,7 +296,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 295 unmodified lines
296296 parse = mov_read_udta_string;
297297
298298 if (!parse) { /* skip leaf atoms data */
299− url_fskip(pb, a.size);
299+ avio_seek(pb, a.size, SEEK_CUR);
300300 } else {
301301 int64_t start_pos = url_ftell(pb);
302302 int64_t left;
@@ -308,14 +308,14 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 5 unmodified lines
308308 return 0;
309309 left = a.size - url_ftell(pb) + start_pos;
310310 if (left > 0) /* skip garbage at atom end */
311− url_fskip(pb, left);
311+ avio_seek(pb, left, SEEK_CUR);
312312 }
313313
314314 total_size += a.size;
315315 }
316316
317317 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);
319319
320320 return 0;
321321 }
@@ -357,7 +357,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 35 unmodified lines
357357 uint16_t volume_len, len;
358358 int16_t type;
359359
360− url_fskip(pb, 10);
360+ avio_seek(pb, 10, SEEK_CUR);
361361
362362 volume_len = avio_r8(pb);
363363 volume_len = FFMIN(volume_len, 27);
@@ -365,7 +365,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 1 unmodified line
365365 dref->volume[volume_len] = 0;
366366 av_log(c->fc, AV_LOG_DEBUG, "volume %s, len %d\n", dref->volume, volume_len);
367367
368− url_fskip(pb, 12);
368+ avio_seek(pb, 12, SEEK_CUR);
369369
370370 len = avio_r8(pb);
371371 len = FFMIN(len, 63);
@@ -373,7 +373,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 1 unmodified line
373373 dref->filename[len] = 0;
374374 av_log(c->fc, AV_LOG_DEBUG, "filename %s, len %d\n", dref->filename, len);
375375
376− url_fskip(pb, 16);
376+ avio_seek(pb, 16, SEEK_CUR);
377377
378378 /* read next level up_from_alias/down_to_target */
379379 dref->nlvl_from = avio_rb16(pb);
@@ -381,7 +381,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 1 unmodified line
381381 av_log(c->fc, AV_LOG_DEBUG, "nlvl from %d, nlvl to %d\n",
382382 dref->nlvl_from, dref->nlvl_to);
383383
384− url_fskip(pb, 16);
384+ avio_seek(pb, 16, SEEK_CUR);
385385
386386 for (type = 0; type != -1 && url_ftell(pb) < next; ) {
387387 type = avio_rb16(pb);
@@ -416,7 +416,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 28 unmodified lines
416416 dref->dir[j] = '/';
417417 av_log(c->fc, AV_LOG_DEBUG, "dir %s\n", dref->dir);
418418 } else
419− url_fskip(pb, len);
419+ avio_seek(pb, len, SEEK_CUR);
420420 }
421421 }
422422 avio_seek(pb, next, SEEK_SET);
@@ -663,9 +663,9 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 240 unmodified lines
663663
664664 avio_rb16(pb); /* preferred volume */
665665
666− url_fskip(pb, 10); /* reserved */
666+ avio_seek(pb, 10, SEEK_CUR); /* reserved */
667667
668− url_fskip(pb, 36); /* display matrix */
668+ avio_seek(pb, 36, SEEK_CUR); /* display matrix */
669669
670670 avio_rb32(pb); /* preview time */
671671 avio_rb32(pb); /* preview duration */
@@ -782,7 +782,7 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 110 unmodified lines
782782 if (mov_read_default(c, pb, atom) < 0)
783783 return -1;
784784 } else
785− url_fskip(pb, atom.size);
785+ avio_seek(pb, atom.size, SEEK_CUR);
786786 return 0;
787787 }
788788
@@ -833,7 +833,7 @@ static int mov_read_strf(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 44 unmodified lines
833833 if (!st->codec->extradata)
834834 return AVERROR(ENOMEM);
835835 st->codec->extradata_size = atom.size - 40;
836− url_fskip(pb, 40);
836+ avio_seek(pb, 40, SEEK_CUR);
837837 avio_read(pb, st->codec->extradata, atom.size - 40);
838838 return 0;
839839 }
@@ -945,7 +945,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 105 unmodified lines
945945 * in the MOV demuxer, patch welcome. */
946946 multiple_stsd:
947947 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);
949949 continue;
950950 }
951951 /* we cannot demux concatenated h264 streams because of different extradata */
@@ -1003,7 +1003,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 51 unmodified lines
10031003 len = 31;
10041004 mov_read_mac_string(c, pb, len, st->codec->codec_name, 32);
10051005 if (len < 31)
1006− url_fskip(pb, 31 - len);
1006+ avio_seek(pb, 31 - len, SEEK_CUR);
10071007 /* codec_tag YV12 triggers an UV swap in rawdec.c */
10081008 if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))
10091009 st->codec->codec_tag=MKTAG('I', '4', '2', '0');
@@ -1174,7 +1174,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 164 unmodified lines
11741174 st->codec->height = sc->height;
11751175 } else {
11761176 /* 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);
11781178 }
11791179 /* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */
11801180 a.size = size - (url_ftell(pb) - start_pos);
@@ -1182,7 +1182,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 1 unmodified line
11821182 if (mov_read_default(c, pb, a) < 0)
11831183 return -1;
11841184 } else if (a.size > 0)
1185− url_fskip(pb, a.size);
1185+ avio_seek(pb, a.size, SEEK_CUR);
11861186 }
11871187
11881188 if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
@@ -2078,13 +2078,13 @@ static int mov_read_wide(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 889 unmodified lines
20782078 if (atom.size < 8)
20792079 return 0; /* continue */
20802080 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);
20822082 return 0;
20832083 }
20842084 atom.type = avio_rl32(pb);
20852085 atom.size -= 8;
20862086 if (atom.type != MKTAG('m','d','a','t')) {
2087− url_fskip(pb, atom.size);
2087+ avio_seek(pb, atom.size, SEEK_CUR);
20882088 return 0;
20892089 }
20902090 err = mov_read_mdat(c, pb, atom);
libavformat/mpc8.c+2−2
@@ -182,7 +182,7 @@ static void mpc8_handle_chunk(AVFormatContext *s, int tag, int64_t chunk_pos, in · 181 unmodified lines
182182 avio_seek(pb, pos, SEEK_SET);
183183 break;
184184 default:
185− url_fskip(pb, size);
185+ avio_seek(pb, size, SEEK_CUR);
186186 }
187187 }
188188
@@ -212,7 +212,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap) · 23 unmodified lines
212212 return -1;
213213 }
214214 pos = url_ftell(pb);
215− url_fskip(pb, 4); //CRC
215+ avio_seek(pb, 4, SEEK_CUR); //CRC
216216 c->ver = avio_r8(pb);
217217 if(c->ver != 8){
218218 av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
libavformat/mpeg.c+9−9
@@ -212,7 +212,7 @@ static long mpegps_psm_parse(MpegDemuxContext *m, AVIOContext *pb) · 211 unmodified lines
212212 ps_info_length = avio_rb16(pb);
213213
214214 /* skip program_stream_info */
215− url_fskip(pb, ps_info_length);
215+ avio_seek(pb, ps_info_length, SEEK_CUR);
216216 es_map_length = avio_rb16(pb);
217217
218218 /* at least one es available? */
@@ -223,7 +223,7 @@ static long mpegps_psm_parse(MpegDemuxContext *m, AVIOContext *pb) · 4 unmodified lines
223223 /* remember mapping from stream id to stream type */
224224 m->psm_es_type[es_id] = type;
225225 /* skip program_stream_info */
226− url_fskip(pb, es_info_length);
226+ avio_seek(pb, es_info_length, SEEK_CUR);
227227 es_map_length -= 4 + es_info_length;
228228 }
229229 avio_rb32(pb); /* crc32 */
@@ -264,7 +264,7 @@ static int mpegps_read_pes_header(AVFormatContext *s, · 34 unmodified lines
264264 if (startcode == SYSTEM_HEADER_START_CODE)
265265 goto redo;
266266 if (startcode == PADDING_STREAM) {
267− url_fskip(s->pb, avio_rb16(s->pb));
267+ avio_seek(s->pb, avio_rb16(s->pb), SEEK_CUR);
268268 goto redo;
269269 }
270270 if (startcode == PRIVATE_STREAM_2) {
@@ -281,7 +281,7 @@ static int mpegps_read_pes_header(AVFormatContext *s, · 10 unmodified lines
281281 }
282282 m->sofdec -= !m->sofdec;
283283 }
284− url_fskip(s->pb, len);
284+ avio_seek(s->pb, len, SEEK_CUR);
285285 goto redo;
286286 }
287287 if (startcode == PROGRAM_STREAM_MAP) {
@@ -359,7 +359,7 @@ static int mpegps_read_pes_header(AVFormatContext *s, · 71 unmodified lines
359359 av_log(s, AV_LOG_WARNING, "pes_ext %X is invalid\n", pes_ext);
360360 pes_ext=skip=0;
361361 }
362− url_fskip(s->pb, skip);
362+ avio_seek(s->pb, skip, SEEK_CUR);
363363 header_len -= skip;
364364
365365 if (pes_ext & 0x01) { /* PES extension 2 */
@@ -375,7 +375,7 @@ static int mpegps_read_pes_header(AVFormatContext *s, · 9 unmodified lines
375375 }
376376 if(header_len < 0)
377377 goto error_redo;
378− url_fskip(s->pb, header_len);
378+ avio_seek(s->pb, header_len, SEEK_CUR);
379379 }
380380 else if( c!= 0xf )
381381 goto redo;
@@ -433,7 +433,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 51 unmodified lines
433433
434434 if(startcode == 0x1bd) {
435435 dvdaudio_substream_type = avio_r8(s->pb);
436− url_fskip(s->pb, 3);
436+ avio_seek(s->pb, 3, SEEK_CUR);
437437 len -= 4;
438438 }
439439
@@ -525,7 +525,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 85 unmodified lines
525525 } else {
526526 skip:
527527 /* skip packet */
528− url_fskip(s->pb, len);
528+ avio_seek(s->pb, len, SEEK_CUR);
529529 goto redo;
530530 }
531531 /* no stream found: add a new stream */
@@ -602,7 +602,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, · 70 unmodified lines
602602 dts != AV_NOPTS_VALUE) {
603603 break;
604604 }
605− url_fskip(s->pb, len);
605+ avio_seek(s->pb, len, SEEK_CUR);
606606 }
607607 #ifdef DEBUG_SEEK
608608 printf("pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n", pos, dts, dts / 90000.0);
libavformat/mpegts.c+1−1
@@ -1346,7 +1346,7 @@ static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size) · 1345 unmodified lines
13461346 } else {
13471347 skip = raw_packet_size - TS_PACKET_SIZE;
13481348 if (skip > 0)
1349− url_fskip(pb, skip);
1349+ avio_seek(pb, skip, SEEK_CUR);
13501350 break;
13511351 }
13521352 }
libavformat/msnwc_tcp.c+6−6
@@ -104,19 +104,19 @@ static int msnwc_tcp_read_packet(AVFormatContext *ctx, AVPacket *pkt) · 103 unmodified lines
104104 uint16_t keyframe;
105105 uint32_t size, timestamp;
106106
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);
110110 keyframe = avio_rl16(pb);
111111 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);
114114 timestamp = avio_rl32(pb);
115115
116116 if(!size || av_get_packet(pb, pkt, size) != size)
117117 return -1;
118118
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 */
120120
121121 pkt->pts = timestamp;
122122 pkt->dts = timestamp;
libavformat/mtv.c+4−4
@@ -83,10 +83,10 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 82 unmodified lines
8383 AVStream *st;
8484 unsigned int audio_subsegments;
8585
86− url_fskip(pb, 3);
86+ avio_seek(pb, 3, SEEK_CUR);
8787 mtv->file_size = avio_rl32(pb);
8888 mtv->segments = avio_rl32(pb);
89− url_fskip(pb, 32);
89+ avio_seek(pb, 32, SEEK_CUR);
9090 mtv->audio_identifier = avio_rl24(pb);
9191 mtv->audio_br = avio_rl16(pb);
9292 mtv->img_colorfmt = avio_rl24(pb);
@@ -105,7 +105,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 12 unmodified lines
105105 mtv->img_height=mtv->img_segment_size / (mtv->img_bpp>>3)
106106 / mtv->img_width;
107107
108− url_fskip(pb, 4);
108+ avio_seek(pb, 4, SEEK_CUR);
109109 audio_subsegments = avio_rl16(pb);
110110 mtv->full_segment_size =
111111 audio_subsegments * (MTV_AUDIO_PADDING_SIZE + MTV_ASUBCHUNK_DATA_SIZE) +
@@ -164,7 +164,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt) · 52 unmodified lines
164164
165165 if((url_ftell(pb) - s->data_offset + mtv->img_segment_size) % mtv->full_segment_size)
166166 {
167− url_fskip(pb, MTV_AUDIO_PADDING_SIZE);
167+ avio_seek(pb, MTV_AUDIO_PADDING_SIZE, SEEK_CUR);
168168
169169 ret = av_get_packet(pb, pkt, MTV_ASUBCHUNK_DATA_SIZE);
170170 if(ret < 0)
libavformat/mxfdec.c+11−11
@@ -262,7 +262,7 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv · 261 unmodified lines
262262 av_aes_init(mxf->aesc, s->key, 128, 1);
263263 }
264264 // crypto context
265− url_fskip(pb, klv_decode_ber_length(pb));
265+ avio_seek(pb, klv_decode_ber_length(pb), SEEK_CUR);
266266 // plaintext offset
267267 klv_decode_ber_length(pb);
268268 plaintext_size = avio_rb64(pb);
@@ -297,7 +297,7 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv · 28 unmodified lines
297297 &pkt->data[plaintext_size], size >> 4, ivec, 1);
298298 pkt->size = orig_size;
299299 pkt->stream_index = index;
300− url_fskip(pb, end - url_ftell(pb));
300+ avio_seek(pb, end - url_ftell(pb), SEEK_CUR);
301301 return 0;
302302 }
303303
@@ -339,7 +339,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) · 35 unmodified lines
339339 return 0;
340340 } else
341341 skip:
342− url_fskip(s->pb, klv.length);
342+ avio_seek(s->pb, klv.length, SEEK_CUR);
343343 }
344344 return AVERROR_EOF;
345345 }
@@ -397,7 +397,7 @@ static int mxf_read_content_storage(void *arg, AVIOContext *pb, int tag, int siz · 51 unmodified lines
397397 mxf->packages_refs = av_malloc(mxf->packages_count * sizeof(UID));
398398 if (!mxf->packages_refs)
399399 return -1;
400− url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
400+ avio_seek(pb, 4, SEEK_CUR); /* useless size of objects, always 16 according to specs */
401401 avio_read(pb, (uint8_t *)mxf->packages_refs, mxf->packages_count * sizeof(UID));
402402 break;
403403 }
@@ -416,7 +416,7 @@ static int mxf_read_source_clip(void *arg, AVIOContext *pb, int tag, int size, U · 12 unmodified lines
416416 break;
417417 case 0x1101:
418418 /* UMID, only get last 16 bytes */
419− url_fskip(pb, 16);
419+ avio_seek(pb, 16, SEEK_CUR);
420420 avio_read(pb, source_clip->source_package_uid, 16);
421421 break;
422422 case 0x1102:
@@ -437,7 +437,7 @@ static int mxf_read_material_package(void *arg, AVIOContext *pb, int tag, int si · 14 unmodified lines
437437 package->tracks_refs = av_malloc(package->tracks_count * sizeof(UID));
438438 if (!package->tracks_refs)
439439 return -1;
440− url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
440+ avio_seek(pb, 4, SEEK_CUR); /* useless size of objects, always 16 according to specs */
441441 avio_read(pb, (uint8_t *)package->tracks_refs, package->tracks_count * sizeof(UID));
442442 break;
443443 }
@@ -482,7 +482,7 @@ static int mxf_read_sequence(void *arg, AVIOContext *pb, int tag, int size, UID · 38 unmodified lines
482482 sequence->structural_components_refs = av_malloc(sequence->structural_components_count * sizeof(UID));
483483 if (!sequence->structural_components_refs)
484484 return -1;
485− url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
485+ avio_seek(pb, 4, SEEK_CUR); /* useless size of objects, always 16 according to specs */
486486 avio_read(pb, (uint8_t *)sequence->structural_components_refs, sequence->structural_components_count * sizeof(UID));
487487 break;
488488 }
@@ -500,12 +500,12 @@ static int mxf_read_source_package(void *arg, AVIOContext *pb, int tag, int size · 11 unmodified lines
500500 package->tracks_refs = av_malloc(package->tracks_count * sizeof(UID));
501501 if (!package->tracks_refs)
502502 return -1;
503− url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
503+ avio_seek(pb, 4, SEEK_CUR); /* useless size of objects, always 16 according to specs */
504504 avio_read(pb, (uint8_t *)package->tracks_refs, package->tracks_count * sizeof(UID));
505505 break;
506506 case 0x4401:
507507 /* UMID, only get last 16 bytes */
508− url_fskip(pb, 16);
508+ avio_seek(pb, 16, SEEK_CUR);
509509 avio_read(pb, package->package_uid, 16);
510510 break;
511511 case 0x4701:
@@ -558,7 +558,7 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int · 46 unmodified lines
558558 descriptor->sub_descriptors_refs = av_malloc(descriptor->sub_descriptors_count * sizeof(UID));
559559 if (!descriptor->sub_descriptors_refs)
560560 return -1;
561− url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
561+ avio_seek(pb, 4, SEEK_CUR); /* useless size of objects, always 16 according to specs */
562562 avio_read(pb, (uint8_t *)descriptor->sub_descriptors_refs, descriptor->sub_descriptors_count * sizeof(UID));
563563 break;
564564 case 0x3004:
@@ -943,7 +943,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 378 unmodified lines
943943 }
944944 }
945945 if (!metadata->read)
946− url_fskip(s->pb, klv.length);
946+ avio_seek(s->pb, klv.length, SEEK_CUR);
947947 }
948948 return mxf_parse_structural_metadata(mxf);
949949 }
libavformat/ncdec.c+1−1
@@ -73,7 +73,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt) · 72 unmodified lines
7373
7474 avio_r8(s->pb);
7575 size = avio_rl16(s->pb);
76− url_fskip(s->pb, 9);
76+ avio_seek(s->pb, 9, SEEK_CUR);
7777
7878 if (size == 0) {
7979 av_log(s, AV_LOG_DEBUG, "Next packet size is zero\n");
libavformat/nsvdec.c+1−1
@@ -584,7 +584,7 @@ null_chunk_retry: · 583 unmodified lines
584584 ((auxtag >> 16) & 0x0ff),
585585 ((auxtag >> 24) & 0x0ff),
586586 auxsize);
587− url_fskip(pb, auxsize);
587+ avio_seek(pb, auxsize, SEEK_CUR);
588588 vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming braindead */
589589 }
590590
libavformat/nutdec.c+1−1
@@ -757,7 +757,7 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code){ · 756 unmodified lines
757757 ||(discard >= AVDISCARD_BIDIR && last_IP_pts != AV_NOPTS_VALUE && last_IP_pts > pts)
758758 || discard >= AVDISCARD_ALL
759759 || stc->skip_until_key_frame){
760− url_fskip(bc, size);
760+ avio_seek(bc, size, SEEK_CUR);
761761 return 1;
762762 }
763763
libavformat/nuv.c+14−14
@@ -66,7 +66,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, · 65 unmodified lines
6666 switch (frametype) {
6767 case NUV_EXTRADATA:
6868 subtype = avio_r8(pb);
69− url_fskip(pb, 6);
69+ avio_seek(pb, 6, SEEK_CUR);
7070 size = PKTSIZE(avio_rl32(pb));
7171 if (vst && subtype == 'R') {
7272 vst->codec->extradata_size = size;
@@ -78,7 +78,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, · 5 unmodified lines
7878 }
7979 break;
8080 case NUV_MYTHEXT:
81− url_fskip(pb, 7);
81+ avio_seek(pb, 7, SEEK_CUR);
8282 size = PKTSIZE(avio_rl32(pb));
8383 if (size != 128 * 4)
8484 break;
@@ -90,7 +90,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, · 5 unmodified lines
9090 if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
9191 vst->codec->codec_id = CODEC_ID_NUV;
9292 } else
93− url_fskip(pb, 4);
93+ avio_seek(pb, 4, SEEK_CUR);
9494
9595 if (ast) {
9696 ast->codec->codec_tag = avio_rl32(pb);
@@ -102,20 +102,20 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, · 5 unmodified lines
102102 ast->codec->bits_per_coded_sample);
103103 ast->need_parsing = AVSTREAM_PARSE_FULL;
104104 } else
105− url_fskip(pb, 4 * 4);
105+ avio_seek(pb, 4 * 4, SEEK_CUR);
106106
107107 size -= 6 * 4;
108− url_fskip(pb, size);
108+ avio_seek(pb, size, SEEK_CUR);
109109 return 1;
110110 case NUV_SEEKP:
111111 size = 11;
112112 break;
113113 default:
114− url_fskip(pb, 7);
114+ avio_seek(pb, 7, SEEK_CUR);
115115 size = PKTSIZE(avio_rl32(pb));
116116 break;
117117 }
118− url_fskip(pb, size);
118+ avio_seek(pb, size, SEEK_CUR);
119119 }
120120 return 0;
121121 }
@@ -130,14 +130,14 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { · 8 unmodified lines
130130 AVStream *vst = NULL, *ast = NULL;
131131 avio_read(pb, id_string, 12);
132132 is_mythtv = !memcmp(id_string, "MythTVVideo", 12);
133− url_fskip(pb, 5); // version string
134− url_fskip(pb, 3); // padding
133+ avio_seek(pb, 5, SEEK_CUR); // version string
134+ avio_seek(pb, 3, SEEK_CUR); // padding
135135 width = avio_rl32(pb);
136136 height = avio_rl32(pb);
137137 avio_rl32(pb); // unused, "desiredwidth"
138138 avio_rl32(pb); // unused, "desiredheight"
139139 avio_r8(pb); // 'P' == progressive, 'I' == interlaced
140− url_fskip(pb, 3); // padding
140+ avio_seek(pb, 3, SEEK_CUR); // padding
141141 aspect = av_int2dbl(avio_rl64(pb));
142142 if (aspect > 0.9999 && aspect < 1.0001)
143143 aspect = 4.0 / 3.0;
@@ -206,13 +206,13 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { · 62 unmodified lines
206206 switch (frametype) {
207207 case NUV_EXTRADATA:
208208 if (!ctx->rtjpg_video) {
209− url_fskip(pb, size);
209+ avio_seek(pb, size, SEEK_CUR);
210210 break;
211211 }
212212 case NUV_VIDEO:
213213 if (ctx->v_id < 0) {
214214 av_log(s, AV_LOG_ERROR, "Video packet in file without video stream!\n");
215− url_fskip(pb, size);
215+ avio_seek(pb, size, SEEK_CUR);
216216 break;
217217 }
218218 ret = av_new_packet(pkt, copyhdrsize + size);
@@ -236,7 +236,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { · 17 unmodified lines
236236 case NUV_AUDIO:
237237 if (ctx->a_id < 0) {
238238 av_log(s, AV_LOG_ERROR, "Audio packet in file without audio stream!\n");
239− url_fskip(pb, size);
239+ avio_seek(pb, size, SEEK_CUR);
240240 break;
241241 }
242242 ret = av_get_packet(pb, pkt, size);
@@ -250,7 +250,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { · 7 unmodified lines
250250 // contains no data, size value is invalid
251251 break;
252252 default:
253− url_fskip(pb, size);
253+ avio_seek(pb, size, SEEK_CUR);
254254 break;
255255 }
256256 }
libavformat/pva.c+1−1
@@ -122,7 +122,7 @@ recover: · 121 unmodified lines
122122 if (pes_signal != 1) {
123123 pva_log(s, AV_LOG_WARNING, "expected signaled PES packet, "
124124 "trying to recover\n");
125− url_fskip(pb, length - 9);
125+ avio_seek(pb, length - 9, SEEK_CUR);
126126 if (!read_packet)
127127 return AVERROR(EIO);
128128 goto recover;
libavformat/qcp.c+7−7
@@ -93,7 +93,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) · 92 unmodified lines
9393
9494 avio_rb32(pb); // "RIFF"
9595 s->file_size = avio_rl32(pb) + 8;
96− url_fskip(pb, 8 + 4 + 1 + 1); // "QLCMfmt " + chunk-size + major-version + minor-version
96+ avio_seek(pb, 8 + 4 + 1 + 1, SEEK_CUR); // "QLCMfmt " + chunk-size + major-version + minor-version
9797
9898 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9999 st->codec->channels = 1;
@@ -110,13 +110,13 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) · 10 unmodified lines
110110 av_log(s, AV_LOG_ERROR, "Unknown codec GUID.\n");
111111 return AVERROR_INVALIDDATA;
112112 }
113− url_fskip(pb, 2 + 80); // codec-version + codec-name
113+ avio_seek(pb, 2 + 80, SEEK_CUR); // codec-version + codec-name
114114 st->codec->bit_rate = avio_rl16(pb);
115115
116116 s->packet_size = avio_rl16(pb);
117− url_fskip(pb, 2); // block-size
117+ avio_seek(pb, 2, SEEK_CUR); // block-size
118118 st->codec->sample_rate = avio_rl16(pb);
119− url_fskip(pb, 2); // sample-size
119+ avio_seek(pb, 2, SEEK_CUR); // sample-size
120120
121121 memset(c->rates_per_mode, -1, sizeof(c->rates_per_mode));
122122 nb_rates = avio_rl32(pb);
@@ -129,7 +129,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines
129129 } else
130130 c->rates_per_mode[mode] = size;
131131 }
132− url_fskip(pb, 16 - 2*nb_rates + 20); // empty entries of rate-map-table + reserved
132+ avio_seek(pb, 16 - 2*nb_rates + 20, SEEK_CUR); // empty entries of rate-map-table + reserved
133133
134134 return 0;
135135 }
@@ -174,14 +174,14 @@ static int qcp_read_packet(AVFormatContext *s, AVPacket *pkt) · 38 unmodified lines
174174 case MKTAG('v', 'r', 'a', 't'):
175175 if (avio_rl32(pb)) // var-rate-flag
176176 s->packet_size = 0;
177− url_fskip(pb, 4); // size-in-packets
177+ avio_seek(pb, 4, SEEK_CUR); // size-in-packets
178178 break;
179179 case MKTAG('d', 'a', 't', 'a'):
180180 c->data_size = chunk_size;
181181 break;
182182
183183 default:
184− url_fskip(pb, chunk_size);
184+ avio_seek(pb, chunk_size, SEEK_CUR);
185185 }
186186 }
187187 return AVERROR_EOF;
libavformat/r3d.c+3−3
@@ -72,7 +72,7 @@ static int r3d_read_red1(AVFormatContext *s) · 71 unmodified lines
7272 tmp = avio_rb32(s->pb); // filenum
7373 av_dlog(s, "filenum %d\n", tmp);
7474
75− url_fskip(s->pb, 32); // unknown
75+ avio_seek(s->pb, 32, SEEK_CUR); // unknown
7676
7777 st->codec->width = avio_rb32(s->pb);
7878 st->codec->height = avio_rb32(s->pb);
@@ -152,7 +152,7 @@ static void r3d_read_reos(AVFormatContext *s) · 73 unmodified lines
152152 tmp = avio_rb32(s->pb);
153153 av_dlog(s, "num audio chunks %d\n", tmp);
154154
155− url_fskip(s->pb, 6*4);
155+ avio_seek(s->pb, 6*4, SEEK_CUR);
156156 }
157157
158158 static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
@@ -332,7 +332,7 @@ static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt) · 173 unmodified lines
332332 break;
333333 default:
334334 skip:
335− url_fskip(s->pb, atom.size-8);
335+ avio_seek(s->pb, atom.size-8, SEEK_CUR);
336336 }
337337 }
338338 return err;
libavformat/rdt.c+3−3
@@ -161,16 +161,16 @@ rdt_load_mdpr (PayloadContext *rdt, AVStream *st, int rule_nr) · 160 unmodified lines
161161 num = avio_rb16(&pb);
162162 if (rule_nr < 0 || rule_nr >= num)
163163 return -1;
164− url_fskip(&pb, rule_nr * 2);
164+ avio_seek(&pb, rule_nr * 2, SEEK_CUR);
165165 chunk_nr = avio_rb16(&pb);
166− url_fskip(&pb, (num - 1 - rule_nr) * 2);
166+ avio_seek(&pb, (num - 1 - rule_nr) * 2, SEEK_CUR);
167167
168168 /* read MDPR chunks */
169169 num = avio_rb16(&pb);
170170 if (chunk_nr >= num)
171171 return -1;
172172 while (chunk_nr--)
173− url_fskip(&pb, avio_rb32(&pb));
173+ avio_seek(&pb, avio_rb32(&pb), SEEK_CUR);
174174 size = avio_rb32(&pb);
175175 } else {
176176 size = rdt->mlti_data_size;
libavformat/riff.c+2−2
@@ -501,7 +501,7 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) · 500 unmodified lines
501501 codec->bits_per_coded_sample = avio_rl16(pb);
502502 codec->channel_layout = avio_rl32(pb); /* dwChannelMask */
503503 id = avio_rl32(pb); /* 4 first bytes of GUID */
504− url_fskip(pb, 12); /* skip end of GUID */
504+ avio_seek(pb, 12, SEEK_CUR); /* skip end of GUID */
505505 cbSize -= 22;
506506 size -= 22;
507507 }
@@ -514,7 +514,7 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) · 6 unmodified lines
514514
515515 /* It is possible for the chunk to contain garbage at the end */
516516 if (size > 0)
517− url_fskip(pb, size);
517+ avio_seek(pb, size, SEEK_CUR);
518518 }
519519 codec->codec_id = ff_wav_codec_get_id(id, codec->bits_per_coded_sample);
520520 if (codec->codec_id == CODEC_ID_AAC_LATM) {
libavformat/rl2.c+1−1
@@ -95,7 +95,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, · 94 unmodified lines
9595 int i;
9696 int ret = 0;
9797
98− url_fskip(pb,4); /* skip FORM tag */
98+ avio_seek(pb,4, SEEK_CUR); /* skip FORM tag */
9999 back_size = avio_rl32(pb); /**< get size of the background frame */
100100 signature = avio_rb32(pb);
101101 data_size = avio_rb32(pb);
libavformat/rmdec.c+11−11
@@ -132,7 +132,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, · 131 unmodified lines
132132 if (version == 3) {
133133 int header_size = avio_rb16(pb);
134134 int64_t startpos = url_ftell(pb);
135− url_fskip(pb, 14);
135+ avio_seek(pb, 14, SEEK_CUR);
136136 rm_read_metadata(s, 0);
137137 if ((startpos + header_size) >= url_ftell(pb) + 2) {
138138 // fourcc (should always be "lpcJ")
@@ -141,7 +141,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, · 2 unmodified lines
141141 }
142142 // Skip extra header crap (this should never happen)
143143 if ((startpos + header_size) > url_ftell(pb))
144− url_fskip(pb, header_size + startpos - url_ftell(pb));
144+ avio_seek(pb, header_size + startpos - url_ftell(pb), SEEK_CUR);
145145 st->codec->sample_rate = 8000;
146146 st->codec->channels = 1;
147147 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -150,7 +150,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, · 2 unmodified lines
150150 int flavor, sub_packet_h, coded_framesize, sub_packet_size;
151151 int codecdata_length;
152152 /* old version (4) */
153− url_fskip(pb, 2); /* unused */
153+ avio_seek(pb, 2, SEEK_CUR); /* unused */
154154 avio_rb32(pb); /* .ra4 */
155155 avio_rb32(pb); /* data size */
156156 avio_rb16(pb); /* version2 */
@@ -321,7 +321,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, · 164 unmodified lines
321321 skip:
322322 /* skip codec info */
323323 size = url_ftell(pb) - codec_pos;
324− url_fskip(pb, codec_data_size - size);
324+ avio_seek(pb, codec_data_size - size, SEEK_CUR);
325325
326326 return 0;
327327 }
@@ -340,7 +340,7 @@ static int rm_read_index(AVFormatContext *s) · 12 unmodified lines
340340 size = avio_rb32(pb);
341341 if (size < 20)
342342 return -1;
343− url_fskip(pb, 2);
343+ avio_seek(pb, 2, SEEK_CUR);
344344 n_pkts = avio_rb32(pb);
345345 str_id = avio_rb16(pb);
346346 next_off = avio_rb32(pb);
@@ -353,10 +353,10 @@ static int rm_read_index(AVFormatContext *s) · 6 unmodified lines
353353 goto skip;
354354
355355 for (n = 0; n < n_pkts; n++) {
356− url_fskip(pb, 2);
356+ avio_seek(pb, 2, SEEK_CUR);
357357 pts = avio_rb32(pb);
358358 pos = avio_rb32(pb);
359− url_fskip(pb, 4); /* packet no. */
359+ avio_seek(pb, 4, SEEK_CUR); /* packet no. */
360360
361361 av_add_index_entry(st, pos, pts, 0, 0, AVINDEX_KEYFRAME);
362362 }
@@ -469,7 +469,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 106 unmodified lines
469469 goto header_end;
470470 default:
471471 /* unknown tag: skip it */
472− url_fskip(pb, tag_size - 10);
472+ avio_seek(pb, tag_size - 10, SEEK_CUR);
473473 break;
474474 }
475475 }
@@ -529,7 +529,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_ · 53 unmodified lines
529529 if(state == MKBETAG('I', 'N', 'D', 'X')){
530530 int n_pkts, expected_len;
531531 len = avio_rb32(pb);
532− url_fskip(pb, 2);
532+ avio_seek(pb, 2, SEEK_CUR);
533533 n_pkts = avio_rb32(pb);
534534 expected_len = 20 + n_pkts * 14;
535535 if (len == 20)
@@ -566,7 +566,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_ · 30 unmodified lines
566566 if (i == s->nb_streams) {
567567 skip:
568568 /* skip packet if unknown number */
569− url_fskip(pb, len);
569+ avio_seek(pb, len, SEEK_CUR);
570570 rm->remaining_len = 0;
571571 continue;
572572 }
@@ -929,7 +929,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index, · 356 unmodified lines
929929 break;
930930 }
931931
932− url_fskip(s->pb, len);
932+ avio_seek(s->pb, len, SEEK_CUR);
933933 }
934934 *ppos = pos;
935935 return dts;
libavformat/rtpdec_asf.c+5−5
@@ -187,11 +187,11 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, · 186 unmodified lines
187187 flags |= RTP_FLAG_KEY;
188188 len_off = avio_rb24(pb);
189189 if (mflags & 0x20) /**< relative timestamp */
190− url_fskip(pb, 4);
190+ avio_seek(pb, 4, SEEK_CUR);
191191 if (mflags & 0x10) /**< has duration */
192− url_fskip(pb, 4);
192+ avio_seek(pb, 4, SEEK_CUR);
193193 if (mflags & 0x8) /**< has location ID */
194− url_fskip(pb, 4);
194+ avio_seek(pb, 4, SEEK_CUR);
195195 off = url_ftell(pb);
196196
197197 if (!(mflags & 0x40)) {
@@ -214,7 +214,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, · 16 unmodified lines
214214 return AVERROR(EIO);
215215
216216 avio_write(asf->pktbuf, buf + off, len - off);
217− url_fskip(pb, len - off);
217+ avio_seek(pb, len - off, SEEK_CUR);
218218 if (!(flags & RTP_FLAG_MARKER))
219219 return -1;
220220 out_len = url_close_dyn_buf(asf->pktbuf, &asf->buf);
@@ -234,7 +234,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, · 13 unmodified lines
234234 asf->buf = av_realloc(asf->buf, out_len);
235235 memcpy(asf->buf + prev_len, buf + off,
236236 FFMIN(cur_len, len - off));
237− url_fskip(pb, cur_len);
237+ avio_seek(pb, cur_len, SEEK_CUR);
238238 }
239239 }
240240
libavformat/rtpdec_qt.c+2−2
@@ -149,13 +149,13 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, · 148 unmodified lines
149149 break;
150150 }
151151 default:
152− url_fskip(&pb, tlv_len);
152+ avio_seek(&pb, tlv_len, SEEK_CUR);
153153 break;
154154 }
155155 }
156156
157157 /* 32-bit alignment */
158− url_fskip(&pb, ((url_ftell(&pb) + 3) & ~3) - url_ftell(&pb));
158+ avio_seek(&pb, ((url_ftell(&pb) + 3) & ~3) - url_ftell(&pb), SEEK_CUR);
159159 } else
160160 avio_seek(&pb, 4, SEEK_SET);
161161
libavformat/sauce.c+2−2
@@ -51,14 +51,14 @@ int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int g · 50 unmodified lines
5151 GET_SAUCE_META("artist", 20)
5252 GET_SAUCE_META("publisher", 20)
5353 GET_SAUCE_META("date", 8)
54− url_fskip(pb, 4);
54+ avio_seek(pb, 4, SEEK_CUR);
5555 datatype = avio_r8(pb);
5656 filetype = avio_r8(pb);
5757 t1 = avio_rl16(pb);
5858 t2 = avio_rl16(pb);
5959 nb_comments = avio_r8(pb);
6060 flags = avio_r8(pb);
61− url_fskip(pb, 4);
61+ avio_seek(pb, 4, SEEK_CUR);
6262 GET_SAUCE_META("encoder", 22);
6363
6464 if (got_width && datatype && filetype) {
libavformat/siff.c+5−5
@@ -103,7 +103,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) · 102 unmodified lines
103103 }
104104 width = avio_rl16(pb);
105105 height = avio_rl16(pb);
106− url_fskip(pb, 4);
106+ avio_seek(pb, 4, SEEK_CUR);
107107 c->frames = avio_rl16(pb);
108108 if(!c->frames){
109109 av_log(s, AV_LOG_ERROR, "File contains no frames ???\n");
@@ -113,7 +113,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) · 3 unmodified lines
113113 c->rate = avio_rl16(pb);
114114 c->block_align = c->rate * (c->bits >> 3);
115115
116− url_fskip(pb, 16); //zeroes
116+ avio_seek(pb, 16, SEEK_CUR); //zeroes
117117
118118 st = av_new_stream(s, 0);
119119 if (!st)
@@ -145,7 +145,7 @@ static int siff_parse_soun(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) · 25 unmodified lines
145145 av_log(s, AV_LOG_ERROR, "Header chunk size is incorrect\n");
146146 return -1;
147147 }
148− url_fskip(pb, 4); //unknown value
148+ avio_seek(pb, 4, SEEK_CUR); //unknown value
149149 c->rate = avio_rl16(pb);
150150 c->bits = avio_rl16(pb);
151151 c->block_align = c->rate * (c->bits >> 3);
@@ -160,7 +160,7 @@ static int siff_read_header(AVFormatContext *s, AVFormatParameters *ap) · 8 unmodified lines
160160
161161 if (avio_rl32(pb) != TAG_SIFF)
162162 return -1;
163− url_fskip(pb, 4); //ignore size
163+ avio_seek(pb, 4, SEEK_CUR); //ignore size
164164 tag = avio_rl32(pb);
165165
166166 if (tag != TAG_VBV1 && tag != TAG_SOUN){
@@ -176,7 +176,7 @@ static int siff_read_header(AVFormatContext *s, AVFormatParameters *ap) · 9 unmodified lines
176176 av_log(s, AV_LOG_ERROR, "'BODY' chunk is missing\n");
177177 return -1;
178178 }
179− url_fskip(pb, 4); //ignore size
179+ avio_seek(pb, 4, SEEK_CUR); //ignore size
180180
181181 return 0;
182182 }
libavformat/soxdec.c+3−3
@@ -58,14 +58,14 @@ static int sox_read_header(AVFormatContext *s, · 57 unmodified lines
5858 if (avio_rl32(pb) == SOX_TAG) {
5959 st->codec->codec_id = CODEC_ID_PCM_S32LE;
6060 header_size = avio_rl32(pb);
61− url_fskip(pb, 8); /* sample count */
61+ avio_seek(pb, 8, SEEK_CUR); /* sample count */
6262 sample_rate = av_int2dbl(avio_rl64(pb));
6363 st->codec->channels = avio_rl32(pb);
6464 comment_size = avio_rl32(pb);
6565 } else {
6666 st->codec->codec_id = CODEC_ID_PCM_S32BE;
6767 header_size = avio_rb32(pb);
68− url_fskip(pb, 8); /* sample count */
68+ avio_seek(pb, 8, SEEK_CUR); /* sample count */
6969 sample_rate = av_int2dbl(avio_rb64(pb));
7070 st->codec->channels = avio_rb32(pb);
7171 comment_size = avio_rb32(pb);
@@ -105,7 +105,7 @@ static int sox_read_header(AVFormatContext *s, · 33 unmodified lines
105105 AV_METADATA_DONT_STRDUP_VAL);
106106 }
107107
108− url_fskip(pb, header_size - SOX_FIXED_HDR - comment_size);
108+ avio_seek(pb, header_size - SOX_FIXED_HDR - comment_size, SEEK_CUR);
109109
110110 st->codec->sample_rate = sample_rate;
111111 st->codec->bits_per_coded_sample = 32;
libavformat/spdifdec.c+1−1
@@ -201,7 +201,7 @@ static int spdif_read_packet(AVFormatContext *s, AVPacket *pkt) · 200 unmodified lines
201201 }
202202
203203 /* skip over the padding to the beginning of the next frame */
204− url_fskip(pb, offset - pkt->size - BURST_HEADER_SIZE);
204+ avio_seek(pb, offset - pkt->size - BURST_HEADER_SIZE, SEEK_CUR);
205205
206206 if (!s->nb_streams) {
207207 /* first packet, create a stream */
libavformat/swfdec.c+3−3
@@ -70,7 +70,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 69 unmodified lines
7070 /* skip rectangle size */
7171 nbits = avio_r8(pb) >> 3;
7272 len = (4 * nbits - 3 + 7) / 8;
73− url_fskip(pb, len);
73+ avio_seek(pb, len, SEEK_CUR);
7474 swf->frame_rate = avio_rl16(pb); /* 8.8 fixed */
7575 avio_rl16(pb); /* frame count */
7676
@@ -159,7 +159,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 82 unmodified lines
159159 st = s->streams[i];
160160 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
161161 if (st->codec->codec_id == CODEC_ID_MP3) {
162− url_fskip(pb, 4);
162+ avio_seek(pb, 4, SEEK_CUR);
163163 av_get_packet(pb, pkt, len-4);
164164 } else { // ADPCM, PCM
165165 av_get_packet(pb, pkt, len);
@@ -202,7 +202,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 36 unmodified lines
202202 return pkt->size;
203203 }
204204 skip:
205− url_fskip(pb, len);
205+ avio_seek(pb, len, SEEK_CUR);
206206 }
207207 return 0;
208208 }
libavformat/tmv.c+1−1
@@ -152,7 +152,7 @@ static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt) · 151 unmodified lines
152152 ret = av_get_packet(pb, pkt, pkt_size);
153153
154154 if (tmv->stream_index)
155− url_fskip(pb, tmv->padding);
155+ avio_seek(pb, tmv->padding, SEEK_CUR);
156156
157157 pkt->stream_index = tmv->stream_index;
158158 tmv->stream_index ^= 1;
libavformat/tta.c+3−3
@@ -50,7 +50,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap) · 49 unmodified lines
5050 if (avio_rl32(s->pb) != AV_RL32("TTA1"))
5151 return -1; // not tta file
5252
53− url_fskip(s->pb, 2); // FIXME: flags
53+ avio_seek(s->pb, 2, SEEK_CUR); // FIXME: flags
5454 channels = avio_rl16(s->pb);
5555 bps = avio_rl16(s->pb);
5656 samplerate = avio_rl32(s->pb);
@@ -65,7 +65,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap) · 8 unmodified lines
6565 return -1;
6666 }
6767
68− url_fskip(s->pb, 4); // header crc
68+ avio_seek(s->pb, 4, SEEK_CUR); // header crc
6969
7070 framelen = samplerate*256/245;
7171 c->totalframes = datalen / framelen + ((datalen % framelen) ? 1 : 0);
@@ -91,7 +91,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap) · 19 unmodified lines
9191 av_add_index_entry(st, framepos, i*framelen, size, 0, AVINDEX_KEYFRAME);
9292 framepos += size;
9393 }
94− url_fskip(s->pb, 4); // seektable crc
94+ avio_seek(s->pb, 4, SEEK_CUR); // seektable crc
9595
9696 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9797 st->codec->codec_id = CODEC_ID_TTA;
libavformat/txd.c+1−1
@@ -73,7 +73,7 @@ next_chunk: · 72 unmodified lines
7373 if (chunk_size > 100)
7474 break;
7575 case TXD_EXTRA:
76− url_fskip(s->pb, chunk_size);
76+ avio_seek(s->pb, chunk_size, SEEK_CUR);
7777 case TXD_FILE:
7878 case TXD_TEXTURE:
7979 goto next_chunk;
libavformat/vc1test.c+1−1
@@ -68,7 +68,7 @@ static int vc1t_read_header(AVFormatContext *s, · 67 unmodified lines
6868 st->codec->width = avio_rl32(pb);
6969 if(avio_rl32(pb) != 0xC)
7070 return -1;
71− url_fskip(pb, 8);
71+ avio_seek(pb, 8, SEEK_CUR);
7272 fps = avio_rl32(pb);
7373 if(fps == 0xFFFFFFFF)
7474 av_set_pts_info(st, 32, 1, 1000);
libavformat/vocdec.c+4−4
@@ -45,13 +45,13 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 44 unmodified lines
4545 int header_size;
4646 AVStream *st;
4747
48− url_fskip(pb, 20);
48+ avio_seek(pb, 20, SEEK_CUR);
4949 header_size = avio_rl16(pb) - 22;
5050 if (header_size != 4) {
5151 av_log(s, AV_LOG_ERROR, "unknown header size: %d\n", header_size);
5252 return AVERROR(ENOSYS);
5353 }
54− url_fskip(pb, header_size);
54+ avio_seek(pb, header_size, SEEK_CUR);
5555 st = av_new_stream(s, 0);
5656 if (!st)
5757 return AVERROR(ENOMEM);
@@ -114,13 +114,13 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) · 56 unmodified lines
114114 dec->bits_per_coded_sample = avio_r8(pb);
115115 dec->channels = avio_r8(pb);
116116 tmp_codec = avio_rl16(pb);
117− url_fskip(pb, 4);
117+ avio_seek(pb, 4, SEEK_CUR);
118118 voc->remaining_size -= 12;
119119 max_size -= 12;
120120 break;
121121
122122 default:
123− url_fskip(pb, voc->remaining_size);
123+ avio_seek(pb, voc->remaining_size, SEEK_CUR);
124124 max_size -= voc->remaining_size;
125125 voc->remaining_size = 0;
126126 break;
libavformat/vqf.c+3−3
@@ -72,7 +72,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 71 unmodified lines
7272 if (!st)
7373 return AVERROR(ENOMEM);
7474
75− url_fskip(s->pb, 12);
75+ avio_seek(s->pb, 12, SEEK_CUR);
7676
7777 header_size = avio_rb32(s->pb);
7878
@@ -101,7 +101,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 22 unmodified lines
101101 st->codec->channels = avio_rb32(s->pb) + 1;
102102 read_bitrate = avio_rb32(s->pb);
103103 rate_flag = avio_rb32(s->pb);
104− url_fskip(s->pb, len-12);
104+ avio_seek(s->pb, len-12, SEEK_CUR);
105105
106106 st->codec->bit_rate = read_bitrate*1000;
107107 st->codec->bits_per_coded_sample = 16;
@@ -140,7 +140,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 32 unmodified lines
140140 av_log(s, AV_LOG_ERROR, "Unknown chunk: %c%c%c%c\n",
141141 ((char*)&chunk_tag)[0], ((char*)&chunk_tag)[1],
142142 ((char*)&chunk_tag)[2], ((char*)&chunk_tag)[3]);
143− url_fskip(s->pb, FFMIN(len, header_size));
143+ avio_seek(s->pb, FFMIN(len, header_size), SEEK_CUR);
144144 break;
145145 }
146146
libavformat/wav.c+3−3
@@ -217,7 +217,7 @@ static int wav_read_header(AVFormatContext *s, · 216 unmodified lines
217217 avio_rl64(pb); /* RIFF size */
218218 data_size = avio_rl64(pb);
219219 sample_count = avio_rl64(pb);
220− url_fskip(pb, size - 16); /* skip rest of ds64 chunk */
220+ avio_seek(pb, size - 16, SEEK_CUR); /* skip rest of ds64 chunk */
221221 }
222222
223223 /* parse fmt header */
@@ -276,7 +276,7 @@ static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16]) · 52 unmodified lines
276276 return -1;
277277 if (!memcmp(guid, guid1, 16))
278278 return size;
279− url_fskip(pb, FFALIGN(size, INT64_C(8)) - 24);
279+ avio_seek(pb, FFALIGN(size, INT64_C(8)) - 24, SEEK_CUR);
280280 }
281281 return -1;
282282 }
@@ -410,7 +410,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap) · 127 unmodified lines
410410
411411 /* subtract chunk header size - normal wav file doesn't count it */
412412 ff_get_wav_header(pb, st->codec, size - 24);
413− url_fskip(pb, FFALIGN(size, INT64_C(8)) - size);
413+ avio_seek(pb, FFALIGN(size, INT64_C(8)) - size, SEEK_CUR);
414414
415415 st->need_parsing = AVSTREAM_PARSE_FULL;
416416
libavformat/wtv.c+29−29
@@ -539,7 +539,7 @@ static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int ty · 538 unmodified lines
539539 } else {
540540 av_freep(&buf);
541541 av_log(s, AV_LOG_WARNING, "unsupported metadata entry; key:%s, type:%d, length:0x%x\n", key, type, length);
542− url_fskip(pb, length);
542+ avio_seek(pb, length, SEEK_CUR);
543543 return;
544544 }
545545
@@ -582,7 +582,7 @@ static int parse_videoinfoheader2(AVFormatContext *s, AVStream *st) · 36 unmodified lines
582582 WtvContext *wtv = s->priv_data;
583583 AVIOContext *pb = wtv->pb;
584584
585− url_fskip(pb, 72); // picture aspect ratio is unreliable
585+ avio_seek(pb, 72, SEEK_CUR); // picture aspect ratio is unreliable
586586 ff_get_bmp_header(pb, st);
587587
588588 return 72 + 40;
@@ -658,17 +658,17 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 69 unmodified lines
658658
659659 if (size < 32) {
660660 av_log(s, AV_LOG_WARNING, "format buffer size underflow\n");
661− url_fskip(pb, size);
661+ avio_seek(pb, size, SEEK_CUR);
662662 return NULL;
663663 }
664664
665− url_fskip(pb, size - 32);
665+ avio_seek(pb, size - 32, SEEK_CUR);
666666 ff_get_guid(pb, &actual_subtype);
667667 ff_get_guid(pb, &actual_formattype);
668668 avio_seek(pb, -size, SEEK_CUR);
669669
670670 st = parse_media_type(s, st, sid, mediatype, actual_subtype, actual_formattype, size - 32);
671− url_fskip(pb, 32);
671+ avio_seek(pb, 32, SEEK_CUR);
672672 return st;
673673 } else if (!ff_guidcmp(mediatype, mediatype_audio)) {
674674 st = new_stream(s, st, sid, AVMEDIA_TYPE_AUDIO);
@@ -679,7 +679,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 4 unmodified lines
679679 } else {
680680 if (ff_guidcmp(formattype, format_none))
681681 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
682− url_fskip(pb, size);
682+ avio_seek(pb, size, SEEK_CUR);
683683 }
684684
685685 if (!memcmp(subtype + 4, (const uint8_t[]){MEDIASUBTYPE_BASE_GUID}, 12)) {
@@ -701,14 +701,14 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 15 unmodified lines
701701 return NULL;
702702 if (!ff_guidcmp(formattype, format_videoinfo2)) {
703703 int consumed = parse_videoinfoheader2(s, st);
704− url_fskip(pb, FFMAX(size - consumed, 0));
704+ avio_seek(pb, FFMAX(size - consumed, 0), SEEK_CUR);
705705 } else if (!ff_guidcmp(formattype, format_mpeg2_video)) {
706706 int consumed = parse_videoinfoheader2(s, st);
707− url_fskip(pb, FFMAX(size - consumed, 0));
707+ avio_seek(pb, FFMAX(size - consumed, 0), SEEK_CUR);
708708 } else {
709709 if (ff_guidcmp(formattype, format_none))
710710 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
711− url_fskip(pb, size);
711+ avio_seek(pb, size, SEEK_CUR);
712712 }
713713
714714 if (!memcmp(subtype + 4, (const uint8_t[]){MEDIASUBTYPE_BASE_GUID}, 12)) {
@@ -726,7 +726,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 11 unmodified lines
726726 return NULL;
727727 if (ff_guidcmp(formattype, format_none))
728728 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
729− url_fskip(pb, size);
729+ avio_seek(pb, size, SEEK_CUR);
730730 st->codec->codec_id = CODEC_ID_DVB_SUBTITLE;
731731 return st;
732732 } else if (!ff_guidcmp(mediatype, mediatype_mstvcaption) &&
@@ -736,21 +736,21 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 3 unmodified lines
736736 return NULL;
737737 if (ff_guidcmp(formattype, format_none))
738738 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
739− url_fskip(pb, size);
739+ avio_seek(pb, size, SEEK_CUR);
740740 st->codec->codec_id = CODEC_ID_DVB_TELETEXT;
741741 return st;
742742 } else if (!ff_guidcmp(mediatype, mediatype_mpeg2_sections) &&
743743 !ff_guidcmp(subtype, mediasubtype_mpeg2_sections)) {
744744 if (ff_guidcmp(formattype, format_none))
745745 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
746− url_fskip(pb, size);
746+ avio_seek(pb, size, SEEK_CUR);
747747 return NULL;
748748 }
749749
750750 av_log(s, AV_LOG_WARNING, "unknown media type, mediatype:"PRI_GUID
751751 ", subtype:"PRI_GUID", formattype:"PRI_GUID"\n",
752752 ARG_GUID(mediatype), ARG_GUID(subtype), ARG_GUID(formattype));
753− url_fskip(pb, size);
753+ avio_seek(pb, size, SEEK_CUR);
754754 return NULL;
755755 }
756756
@@ -779,17 +779,17 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 22 unmodified lines
779779 if (len < 32)
780780 break;
781781 sid = avio_rl32(pb) & 0x7FFF;
782− url_fskip(pb, 8);
782+ avio_seek(pb, 8, SEEK_CUR);
783783 consumed = 32;
784784
785785 if (!ff_guidcmp(g, stream_guid)) {
786786 if (ff_find_stream_index(s, sid) < 0) {
787787 ff_asf_guid mediatype, subtype, formattype;
788788 int size;
789− url_fskip(pb, 28);
789+ avio_seek(pb, 28, SEEK_CUR);
790790 ff_get_guid(pb, &mediatype);
791791 ff_get_guid(pb, &subtype);
792− url_fskip(pb, 12);
792+ avio_seek(pb, 12, SEEK_CUR);
793793 ff_get_guid(pb, &formattype);
794794 size = avio_rl32(pb);
795795 parse_media_type(s, 0, sid, mediatype, subtype, formattype, size);
@@ -800,10 +800,10 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 4 unmodified lines
800800 if (stream_index >= 0 && !((WtvStream*)s->streams[stream_index]->priv_data)->seen_data) {
801801 ff_asf_guid mediatype, subtype, formattype;
802802 int size;
803− url_fskip(pb, 12);
803+ avio_seek(pb, 12, SEEK_CUR);
804804 ff_get_guid(pb, &mediatype);
805805 ff_get_guid(pb, &subtype);
806− url_fskip(pb, 12);
806+ avio_seek(pb, 12, SEEK_CUR);
807807 ff_get_guid(pb, &formattype);
808808 size = avio_rl32(pb);
809809 parse_media_type(s, s->streams[stream_index], sid, mediatype, subtype, formattype, size);
@@ -822,11 +822,11 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 12 unmodified lines
822822 const uint8_t *pbuf = buf;
823823 int buf_size;
824824
825− url_fskip(pb, 8);
825+ avio_seek(pb, 8, SEEK_CUR);
826826 consumed += 8;
827827 if (!ff_guidcmp(g, EVENTID_CtxADescriptorSpanningEvent) ||
828828 !ff_guidcmp(g, EVENTID_CSDescriptorSpanningEvent)) {
829− url_fskip(pb, 6);
829+ avio_seek(pb, 6, SEEK_CUR);
830830 consumed += 6;
831831 }
832832
@@ -840,7 +840,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 7 unmodified lines
840840 if (stream_index >= 0) {
841841 AVStream *st = s->streams[stream_index];
842842 int audio_type;
843− url_fskip(pb, 8);
843+ avio_seek(pb, 8, SEEK_CUR);
844844 audio_type = avio_r8(pb);
845845 if (audio_type == 2)
846846 st->disposition |= AV_DISPOSITION_HEARING_IMPAIRED;
@@ -851,7 +851,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 4 unmodified lines
851851 } else if (!ff_guidcmp(g, EVENTID_DVBScramblingControlSpanningEvent)) {
852852 int stream_index = ff_find_stream_index(s, sid);
853853 if (stream_index >= 0) {
854− url_fskip(pb, 12);
854+ avio_seek(pb, 12, SEEK_CUR);
855855 if (avio_rl32(pb))
856856 av_log(s, AV_LOG_WARNING, "DVB scrambled stream detected (st:%d), decoding will likely fail\n", stream_index);
857857 consumed += 16;
@@ -861,7 +861,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 3 unmodified lines
861861 if (stream_index >= 0) {
862862 AVStream *st = s->streams[stream_index];
863863 uint8_t language[4];
864− url_fskip(pb, 12);
864+ avio_seek(pb, 12, SEEK_CUR);
865865 avio_read(pb, language, 3);
866866 if (language[0]) {
867867 language[3] = 0;
@@ -874,7 +874,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 6 unmodified lines
874874 } else if (!ff_guidcmp(g, timestamp_guid)) {
875875 int stream_index = ff_find_stream_index(s, sid);
876876 if (stream_index >= 0) {
877− url_fskip(pb, 8);
877+ avio_seek(pb, 8, SEEK_CUR);
878878 wtv->pts = avio_rl64(pb);
879879 consumed += 16;
880880 if (wtv->pts == -1)
@@ -885,7 +885,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 4 unmodified lines
885885 wtv->epoch = wtv->pts;
886886 if (mode == SEEK_TO_PTS && wtv->pts >= seekts) {
887887 #define WTV_PAD8(x) (((x) + 7) & ~7)
888− url_fskip(pb, WTV_PAD8(len) - consumed);
888+ avio_seek(pb, WTV_PAD8(len) - consumed, SEEK_CUR);
889889 return 0;
890890 }
891891 }
@@ -923,7 +923,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p · 31 unmodified lines
923923 } else
924924 av_log(s, AV_LOG_WARNING, "unsupported chunk:"PRI_GUID"\n", ARG_GUID(g));
925925
926− url_fskip(pb, WTV_PAD8(len) - consumed);
926+ avio_seek(pb, WTV_PAD8(len) - consumed, SEEK_CUR);
927927 }
928928 return AVERROR_EOF;
929929 }
@@ -954,13 +954,13 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 24 unmodified lines
954954 wtv->last_valid_pts = AV_NOPTS_VALUE;
955955
956956 /* read root directory sector */
957− url_fskip(s->pb, 0x30);
957+ avio_seek(s->pb, 0x30, SEEK_CUR);
958958 root_size = avio_rl32(s->pb);
959959 if (root_size > sizeof(root)) {
960960 av_log(s, AV_LOG_ERROR, "root directory size exceeds sector size\n");
961961 return AVERROR_INVALIDDATA;
962962 }
963− url_fskip(s->pb, 4);
963+ avio_seek(s->pb, 4, SEEK_CUR);
964964 root_sector = avio_rl32(s->pb);
965965
966966 avio_seek(s->pb, root_sector << WTV_SECTOR_BITS, SEEK_SET);
@@ -1047,7 +1047,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) · 80 unmodified lines
10471047 return ret;
10481048 pkt->stream_index = stream_index;
10491049 pkt->pts = wtv->pts;
1050− url_fskip(pb, WTV_PAD8(len) - len);
1050+ avio_seek(pb, WTV_PAD8(len) - len, SEEK_CUR);
10511051 return 0;
10521052 }
10531053
libavformat/wv.c+3−3
@@ -153,7 +153,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen · 152 unmodified lines
153153 chmask = avio_rl32(pb);
154154 break;
155155 case 5:
156− url_fskip(pb, 1);
156+ avio_seek(pb, 1, SEEK_CUR);
157157 chan |= (avio_r8(pb) & 0xF) << 8;
158158 chmask = avio_rl24(pb);
159159 break;
@@ -166,10 +166,10 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen · 6 unmodified lines
166166 rate = avio_rl24(pb);
167167 break;
168168 default:
169− url_fskip(pb, size);
169+ avio_seek(pb, size, SEEK_CUR);
170170 }
171171 if(id&0x40)
172− url_fskip(pb, 1);
172+ avio_seek(pb, 1, SEEK_CUR);
173173 }
174174 if(rate == -1){
175175 av_log(ctx, AV_LOG_ERROR, "Cannot determine custom sampling rate\n");
libavformat/xa.c+2−2
@@ -76,9 +76,9 @@ static int xa_read_header(AVFormatContext *s, · 75 unmodified lines
7676
7777 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
7878 st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA;
79− url_fskip(pb, 4); /* Skip the XA ID */
79+ avio_seek(pb, 4, SEEK_CUR); /* Skip the XA ID */
8080 xa->out_size = avio_rl32(pb);
81− url_fskip(pb, 2); /* Skip the tag */
81+ avio_seek(pb, 2, SEEK_CUR); /* Skip the tag */
8282 st->codec->channels = avio_rl16(pb);
8383 st->codec->sample_rate = avio_rl32(pb);
8484 /* Value in file is average byte rate*/
libavformat/yop.c+2−2
@@ -81,7 +81,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap) · 80 unmodified lines
8181 video_dec->codec_type = AVMEDIA_TYPE_VIDEO;
8282 video_dec->codec_id = CODEC_ID_YOP;
8383
84− url_fskip(pb, 6);
84+ avio_seek(pb, 6, SEEK_CUR);
8585
8686 frame_rate = avio_r8(pb);
8787 yop->frame_size = avio_r8(pb) * 2048;
@@ -153,7 +153,7 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt) · 65 unmodified lines
153153 // Set position to the start of the frame
154154 pkt->pos = yop->video_packet.pos;
155155
156− url_fskip(pb, yop->audio_block_length - ret);
156+ avio_seek(pb, yop->audio_block_length - ret, SEEK_CUR);
157157
158158 ret = avio_read(pb, yop->video_packet.data + yop->palette_size,
159159 actual_video_data_size);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t