[FFmpeg-devel] [PATCH] avio: avio_ prefixes for url_fseek/fskip

Anton Khirnov anton
Mon Feb 28 13:38:32 CET 2011


---
 libavformat/4xm.c            |    6 +-
 libavformat/aea.c            |    4 +-
 libavformat/aiffdec.c        |   10 ++--
 libavformat/aiffenc.c        |    8 ++--
 libavformat/anm.c            |   24 ++++++------
 libavformat/ape.c            |   10 ++--
 libavformat/apetag.c         |    4 +-
 libavformat/asfdec.c         |   54 +++++++++++++-------------
 libavformat/asfenc.c         |   18 ++++----
 libavformat/au.c             |    6 +-
 libavformat/avidec.c         |   68 +++++++++++++++++-----------------
 libavformat/avienc.c         |   20 +++++-----
 libavformat/avio.h           |    6 ++-
 libavformat/aviobuf.c        |   16 ++++++--
 libavformat/avs.c            |    4 +-
 libavformat/bethsoftvid.c    |    6 +-
 libavformat/bfi.c            |    8 ++--
 libavformat/bink.c           |   10 ++--
 libavformat/c93.c            |    6 +-
 libavformat/cafdec.c         |   20 +++++-----
 libavformat/dv.c             |    6 +-
 libavformat/dxa.c            |   10 ++--
 libavformat/eacdata.c        |    2 +-
 libavformat/electronicarts.c |   24 ++++++------
 libavformat/ffmdec.c         |   10 ++--
 libavformat/filmstripdec.c   |   10 ++--
 libavformat/flacdec.c        |    4 +-
 libavformat/flacenc.c        |    4 +-
 libavformat/flic.c           |    8 ++--
 libavformat/flvdec.c         |   30 +++++++-------
 libavformat/flvenc.c         |   14 +++---
 libavformat/gxf.c            |   40 ++++++++++----------
 libavformat/gxfenc.c         |   18 ++++----
 libavformat/id3v1.c          |    4 +-
 libavformat/id3v2.c          |   16 ++++----
 libavformat/idcin.c          |    2 +-
 libavformat/idroqdec.c       |    6 +-
 libavformat/iff.c            |   16 ++++----
 libavformat/ingenientdec.c   |    6 +-
 libavformat/ipmovie.c        |   34 ++++++++--------
 libavformat/iv8.c            |    2 +-
 libavformat/libnut.c         |    2 +-
 libavformat/lmlm4.c          |    2 +-
 libavformat/lxfdec.c         |    4 +-
 libavformat/matroskadec.c    |   14 +++---
 libavformat/matroskaenc.c    |   12 +++---
 libavformat/mm.c             |    4 +-
 libavformat/mmf.c            |   12 +++---
 libavformat/mov.c            |   46 +++++++++++-----------
 libavformat/movenc.c         |   18 ++++----
 libavformat/movenchint.c     |    8 ++--
 libavformat/mp3dec.c         |   10 ++--
 libavformat/mp3enc.c         |    4 +-
 libavformat/mpc.c            |    8 ++--
 libavformat/mpc8.c           |   10 ++--
 libavformat/mpeg.c           |   28 +++++++-------
 libavformat/mpegts.c         |   22 +++++-----
 libavformat/msnwc_tcp.c      |   12 +++---
 libavformat/mtv.c            |   10 ++--
 libavformat/mxfdec.c         |   30 +++++++-------
 libavformat/mxfenc.c         |    6 +-
 libavformat/ncdec.c          |    2 +-
 libavformat/nsvdec.c         |   10 ++--
 libavformat/nutdec.c         |   16 ++++----
 libavformat/nuv.c            |   28 +++++++-------
 libavformat/oggdec.c         |    6 +-
 libavformat/oggenc.c         |    4 +-
 libavformat/pcm.c            |    2 +-
 libavformat/psxstr.c         |    2 +-
 libavformat/pva.c            |    4 +-
 libavformat/qcp.c            |   14 +++---
 libavformat/r3d.c            |   14 +++---
 libavformat/rdt.c            |    8 ++--
 libavformat/riff.c           |    8 ++--
 libavformat/rl2.c            |    4 +-
 libavformat/rmdec.c          |   30 +++++++-------
 libavformat/rmenc.c          |    4 +-
 libavformat/rpl.c            |    6 +-
 libavformat/rsoenc.c         |    4 +-
 libavformat/rtpdec_asf.c     |   10 ++--
 libavformat/rtpdec_qt.c      |    8 ++--
 libavformat/sauce.c          |    8 ++--
 libavformat/seek.c           |    6 +-
 libavformat/segafilm.c       |    2 +-
 libavformat/sierravmd.c      |    6 +-
 libavformat/siff.c           |   10 ++--
 libavformat/smacker.c        |    4 +-
 libavformat/soxdec.c         |    6 +-
 libavformat/soxenc.c         |    4 +-
 libavformat/spdifdec.c       |    2 +-
 libavformat/swfdec.c         |    6 +-
 libavformat/swfenc.c         |   12 +++---
 libavformat/thp.c            |    4 +-
 libavformat/tiertexseq.c     |   10 ++--
 libavformat/tmv.c            |    4 +-
 libavformat/tta.c            |   10 ++--
 libavformat/tty.c            |    4 +-
 libavformat/txd.c            |    2 +-
 libavformat/utils.c          |   14 +++---
 libavformat/vc1test.c        |    2 +-
 libavformat/vc1testenc.c     |    2 +-
 libavformat/vocdec.c         |    8 ++--
 libavformat/vqf.c            |    8 ++--
 libavformat/wav.c            |   18 ++++----
 libavformat/wc3movie.c       |   14 +++---
 libavformat/westwood.c       |    8 ++--
 libavformat/wtv.c            |   84 +++++++++++++++++++++---------------------
 libavformat/wv.c             |   14 +++---
 libavformat/xa.c             |    4 +-
 libavformat/yop.c            |    8 ++--
 110 files changed, 657 insertions(+), 647 deletions(-)

diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index bf2d738..2757e89 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -106,7 +106,7 @@ static int fourxm_read_header(AVFormatContext *s,
     fourxm->fps = 1.0;
 
     /* skip the first 3 32-bit numbers */
-    url_fseek(pb, 12, SEEK_CUR);
+    avio_seek(pb, 12, SEEK_CUR);
 
     /* check for LIST-HEAD */
     GET_LIST_HEADER();
@@ -322,12 +322,12 @@ static int fourxm_read_packet(AVFormatContext *s,
                 fourxm->tracks[track_number].audio_pts += audio_frame_count;
 
             } else {
-                url_fseek(pb, size, SEEK_CUR);
+                avio_seek(pb, size, SEEK_CUR);
             }
             break;
 
         default:
-            url_fseek(pb, size, SEEK_CUR);
+            avio_seek(pb, size, SEEK_CUR);
             break;
         }
     }
diff --git a/libavformat/aea.c b/libavformat/aea.c
index 8316a7e..2a1d24d 100644
--- a/libavformat/aea.c
+++ b/libavformat/aea.c
@@ -62,9 +62,9 @@ static int aea_read_header(AVFormatContext *s,
         return AVERROR(ENOMEM);
 
     /* Parse the amount of channels and skip to pos 2048(0x800) */
-    url_fskip(s->pb, 264);
+    avio_skip(s->pb, 264);
     st->codec->channels = avio_r8(s->pb);
-    url_fskip(s->pb, 1783);
+    avio_skip(s->pb, 1783);
 
 
     st->codec->codec_type     = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 7b3d1e7..7b15840 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -70,7 +70,7 @@ static void get_meta(AVFormatContext *s, const char *key, int size)
     int res;
 
     if (!str) {
-        url_fskip(s->pb, size);
+        avio_skip(s->pb, size);
         return;
     }
 
@@ -152,7 +152,7 @@ static unsigned int get_aiff_header(AVIOContext *pb, AVCodecContext *codec,
 
     /* Chunk is over */
     if (size)
-        url_fseek(pb, size, SEEK_CUR);
+        avio_seek(pb, size, SEEK_CUR);
 
     return num_frames;
 }
@@ -242,7 +242,7 @@ static int aiff_read_header(AVFormatContext *s,
                 av_log(s, AV_LOG_ERROR, "file is not seekable\n");
                 return -1;
             }
-            url_fskip(pb, size - 8);
+            avio_skip(pb, size - 8);
             break;
         case MKTAG('w', 'a', 'v', 'e'):
             if ((uint64_t)size > (1<<30))
@@ -256,7 +256,7 @@ static int aiff_read_header(AVFormatContext *s,
         default: /* Jump */
             if (size & 1)   /* Always even aligned */
                 size++;
-            url_fskip (pb, size);
+            avio_skip (pb, size);
         }
     }
 
@@ -276,7 +276,7 @@ got_sound:
         st->nb_frames * st->codec->frame_size : st->nb_frames;
 
     /* Position the stream at the first block */
-    url_fseek(pb, offset, SEEK_SET);
+    avio_seek(pb, offset, SEEK_SET);
 
     return 0;
 }
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index de88382..150f36b 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -126,19 +126,19 @@ static int aiff_write_trailer(AVFormatContext *s)
 
     if (!url_is_streamed(s->pb)) {
         /* File length */
-        url_fseek(pb, aiff->form, SEEK_SET);
+        avio_seek(pb, aiff->form, SEEK_SET);
         avio_wb32(pb, file_size - aiff->form - 4);
 
         /* Number of sample frames */
-        url_fseek(pb, aiff->frames, SEEK_SET);
+        avio_seek(pb, aiff->frames, SEEK_SET);
         avio_wb32(pb, (file_size-aiff->ssnd-12)/enc->block_align);
 
         /* Sound Data chunk size */
-        url_fseek(pb, aiff->ssnd, SEEK_SET);
+        avio_seek(pb, aiff->ssnd, SEEK_SET);
         avio_wb32(pb, file_size - aiff->ssnd - 4);
 
         /* return to the end */
-        url_fseek(pb, end_size, SEEK_SET);
+        avio_seek(pb, end_size, SEEK_SET);
 
         put_flush_packet(pb);
     }
diff --git a/libavformat/anm.c b/libavformat/anm.c
index 6bcb90d..91f2743 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -83,7 +83,7 @@ static int read_header(AVFormatContext *s,
     AVStream *st;
     int i, ret;
 
-    url_fskip(pb, 4); /* magic number */
+    avio_skip(pb, 4); /* magic number */
     if (avio_rl16(pb) != MAX_PAGES) {
         av_log_ask_for_sample(s, "max_pages != " AV_STRINGIFY(MAX_PAGES) "\n");
         return AVERROR_INVALIDDATA;
@@ -91,7 +91,7 @@ static int read_header(AVFormatContext *s,
 
     anm->nb_pages   = avio_rl16(pb);
     anm->nb_records = avio_rl32(pb);
-    url_fskip(pb, 2); /* max records per page */
+    avio_skip(pb, 2); /* max records per page */
     anm->page_table_offset = avio_rl16(pb);
     if (avio_rl32(pb) != ANIM_TAG)
         return AVERROR_INVALIDDATA;
@@ -107,13 +107,13 @@ static int read_header(AVFormatContext *s,
     st->codec->height     = avio_rl16(pb);
     if (avio_r8(pb) != 0)
         goto invalid;
-    url_fskip(pb, 1); /* frame rate multiplier info */
+    avio_skip(pb, 1); /* frame rate multiplier info */
 
     /* ignore last delta record (used for looping) */
     if (avio_r8(pb))  /* has_last_delta */
         anm->nb_records = FFMAX(anm->nb_records - 1, 0);
 
-    url_fskip(pb, 1); /* last_delta_valid */
+    avio_skip(pb, 1); /* last_delta_valid */
 
     if (avio_r8(pb) != 0)
         goto invalid;
@@ -121,15 +121,15 @@ static int read_header(AVFormatContext *s,
     if (avio_r8(pb) != 1)
         goto invalid;
 
-    url_fskip(pb, 1); /* other recs per frame */
+    avio_skip(pb, 1); /* other recs per frame */
 
     if (avio_r8(pb) != 1)
         goto invalid;
 
-    url_fskip(pb, 32); /* record_types */
+    avio_skip(pb, 32); /* record_types */
     st->nb_frames = avio_rl32(pb);
     av_set_pts_info(st, 64, 1, avio_rl16(pb));
-    url_fskip(pb, 58);
+    avio_skip(pb, 58);
 
     /* color cycling and palette data */
     st->codec->extradata_size = 16*8 + 4*256;
@@ -143,7 +143,7 @@ static int read_header(AVFormatContext *s,
         goto close_and_return;
 
     /* read page table */
-    ret = url_fseek(pb, anm->page_table_offset, SEEK_SET);
+    ret = avio_seek(pb, anm->page_table_offset, SEEK_SET);
     if (ret < 0)
         goto close_and_return;
 
@@ -192,8 +192,8 @@ repeat:
 
     /* parse page header */
     if (anm->record < 0) {
-        url_fseek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16), SEEK_SET);
-        url_fskip(pb, 8 + 2*p->nb_records);
+        avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16), SEEK_SET);
+        avio_skip(pb, 8 + 2*p->nb_records);
         anm->record = 0;
     }
 
@@ -209,10 +209,10 @@ repeat:
 
     /* fetch record size */
     tmp = url_ftell(pb);
-    url_fseek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16) +
+    avio_seek(pb, anm->page_table_offset + MAX_PAGES*6 + (anm->page<<16) +
               8 + anm->record * 2, SEEK_SET);
     record_size = avio_rl16(pb);
-    url_fseek(pb, tmp, SEEK_SET);
+    avio_seek(pb, tmp, SEEK_SET);
 
     /* fetch record */
     pkt->size = av_get_packet(s->pb, pkt, record_size);
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 862ac1a..028525e 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -187,7 +187,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
         /* Skip any unknown bytes at the end of the descriptor.
            This is for future compatibility */
         if (ape->descriptorlength > 52)
-            url_fseek(pb, ape->descriptorlength - 52, SEEK_CUR);
+            avio_seek(pb, ape->descriptorlength - 52, SEEK_CUR);
 
         /* Read header data */
         ape->compressiontype      = avio_rl16(pb);
@@ -212,7 +212,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
         ape->finalframeblocks     = avio_rl32(pb);
 
         if (ape->formatflags & MAC_FORMAT_FLAG_HAS_PEAK_LEVEL) {
-            url_fseek(pb, 4, SEEK_CUR); /* Skip the peak level */
+            avio_seek(pb, 4, SEEK_CUR); /* Skip the peak level */
             ape->headerlength += 4;
         }
 
@@ -239,7 +239,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
 
         /* Skip any stored wav header */
         if (!(ape->formatflags & MAC_FORMAT_FLAG_CREATE_WAV_HEADER))
-            url_fskip(pb, ape->wavheaderlength);
+            avio_skip(pb, ape->wavheaderlength);
     }
 
     if(ape->totalframes > UINT_MAX / sizeof(APEFrame)){
@@ -289,7 +289,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
     /* try to read APE tags */
     if (!url_is_streamed(pb)) {
         ff_ape_parse_tag(s);
-        url_fseek(pb, 0, SEEK_SET);
+        avio_seek(pb, 0, SEEK_SET);
     }
 
     av_log(s, AV_LOG_DEBUG, "Decoding file - v%d.%02d, compression level %d\n", ape->fileversion / 1000, (ape->fileversion % 1000) / 10, ape->compressiontype);
@@ -342,7 +342,7 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt)
     if (ape->currentframe > ape->totalframes)
         return AVERROR(EIO);
 
-    url_fseek (s->pb, ape->frames[ape->currentframe].pos, SEEK_SET);
+    avio_seek (s->pb, ape->frames[ape->currentframe].pos, SEEK_SET);
 
     /* Calculate how many blocks there are in this frame */
     if (ape->currentframe == (ape->totalframes - 1))
diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index 7252fd2..c3c5771 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -74,7 +74,7 @@ void ff_ape_parse_tag(AVFormatContext *s)
     if (file_size < APE_TAG_FOOTER_BYTES)
         return;
 
-    url_fseek(pb, file_size - APE_TAG_FOOTER_BYTES, SEEK_SET);
+    avio_seek(pb, file_size - APE_TAG_FOOTER_BYTES, SEEK_SET);
 
     avio_read(pb, buf, 8);     /* APETAGEX */
     if (strncmp(buf, "APETAGEX", 8)) {
@@ -105,7 +105,7 @@ void ff_ape_parse_tag(AVFormatContext *s)
         return;
     }
 
-    url_fseek(pb, file_size - tag_bytes, SEEK_SET);
+    avio_seek(pb, file_size - tag_bytes, SEEK_SET);
 
     for (i=0; i<fields; i++)
         if (ape_tag_read_field(s) < 0) break;
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 242f81c..ef46807 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -182,7 +182,7 @@ static void get_tag(AVFormatContext *s, const char *key, int type, int len)
         av_metadata_set2(&s->metadata, key, value, 0);
 finish:
     av_freep(&value);
-    url_fseek(s->pb, off + len, SEEK_SET);
+    avio_seek(s->pb, off + len, SEEK_SET);
 }
 
 static int asf_read_file_properties(AVFormatContext *s, int64_t size)
@@ -350,7 +350,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
         avio_rl16(pb); /* panes */
         st->codec->bits_per_coded_sample = avio_rl16(pb); /* depth */
         tag1 = avio_rl32(pb);
-        url_fskip(pb, 20);
+        avio_skip(pb, 20);
         //                av_log(s, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX);
         if (sizeX > 40) {
             st->codec->extradata_size = sizeX - 40;
@@ -388,7 +388,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
             st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
     }
     pos2 = url_ftell(pb);
-    url_fskip(pb, size - (pos2 - pos1 + 24));
+    avio_skip(pb, size - (pos2 - pos1 + 24));
 
     return 0;
 }
@@ -428,14 +428,14 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
     for (i=0; i<stream_ct; i++){
         avio_rl16(pb);
         ext_len = avio_rl16(pb);
-        url_fseek(pb, ext_len, SEEK_CUR);
+        avio_seek(pb, ext_len, SEEK_CUR);
     }
 
     for (i=0; i<payload_ext_ct; i++){
         ff_get_guid(pb, &g);
         ext_d=avio_rl16(pb);
         ext_len=avio_rl32(pb);
-        url_fseek(pb, ext_len, SEEK_CUR);
+        avio_seek(pb, ext_len, SEEK_CUR);
     }
 
     return 0;
@@ -455,7 +455,7 @@ static int asf_read_content_desc(AVFormatContext *s, int64_t size)
     get_tag(s, "author"   , 0, len2);
     get_tag(s, "copyright", 0, len3);
     get_tag(s, "comment"  , 0, len4);
-    url_fskip(pb, len5);
+    avio_skip(pb, len5);
 
     return 0;
 }
@@ -475,7 +475,7 @@ static int asf_read_ext_content_desc(AVFormatContext *s, int64_t size)
         if (name_len%2)     // must be even, broken lavf versions wrote len-1
             name_len += 1;
         if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
-            url_fskip(pb, name_len - ret);
+            avio_skip(pb, name_len - ret);
         value_type = avio_rl16(pb);
         value_len  = avio_rl16(pb);
         if (!value_type && value_len%2)
@@ -505,7 +505,7 @@ static int asf_read_language_list(AVFormatContext *s, int64_t size)
         char lang[6];
         unsigned int lang_len = avio_r8(pb);
         if ((ret = avio_get_str16le(pb, lang_len, lang, sizeof(lang))) < lang_len)
-            url_fskip(pb, lang_len - ret);
+            avio_skip(pb, lang_len - ret);
         if (j < 128)
             av_strlcpy(asf->stream_languages[j], lang, sizeof(*asf->stream_languages));
     }
@@ -531,10 +531,10 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size)
         value_len=  avio_rl32(pb);
 
         if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
-            url_fskip(pb, name_len - ret);
+            avio_skip(pb, name_len - ret);
         //av_log(s, AV_LOG_ERROR, "%d %d %d %d %d <%s>\n", i, stream_num, name_len, value_type, value_len, name);
         value_num= avio_rl16(pb);//we should use get_value() here but it does not work 2 is le16 here but le32 elsewhere
-        url_fskip(pb, value_len - 2);
+        avio_skip(pb, value_len - 2);
 
         if(stream_num<128){
             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)
         avio_rl32(pb);             // flags
         name_len = avio_rl32(pb);  // name length
         if ((ret = avio_get_str16le(pb, name_len * 2, name, sizeof(name))) < name_len)
-            url_fskip(pb, name_len - ret);
+            avio_skip(pb, name_len - ret);
         ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name );
     }
 
@@ -654,7 +654,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
         }
         if(url_ftell(pb) != gpos + gsize)
             av_log(s, AV_LOG_DEBUG, "gpos mismatch our pos=%"PRIu64", end=%"PRIu64"\n", url_ftell(pb)-gpos, gsize);
-        url_fseek(pb, gpos + gsize, SEEK_SET);
+        avio_seek(pb, gpos + gsize, SEEK_SET);
     }
     ff_get_guid(pb, &g);
     avio_rl64(pb);
@@ -758,7 +758,7 @@ static int ff_asf_get_packet(AVFormatContext *s, AVIOContext *pb)
         d= avio_r8(pb);
         rsize+=3;
     }else{
-        url_fseek(pb, -1, SEEK_CUR); //FIXME
+        avio_seek(pb, -1, SEEK_CUR); //FIXME
     }
 
     asf->packet_flags    = c;
@@ -826,16 +826,16 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
 //            for(i=0; i<asf->packet_replic_size-8; i++)
 //                av_log(s, AV_LOG_DEBUG, "%02X ",avio_r8(pb));
 //            av_log(s, AV_LOG_DEBUG, "\n");
-            url_fskip(pb, 10);
+            avio_skip(pb, 10);
             ts0= avio_rl64(pb);
             ts1= avio_rl64(pb);
-            url_fskip(pb, 12);
+            avio_skip(pb, 12);
             avio_rl32(pb);
-            url_fskip(pb, asf->packet_replic_size - 8 - 38 - 4);
+            avio_skip(pb, asf->packet_replic_size - 8 - 38 - 4);
             if(ts0!= -1) asf->packet_frag_timestamp= ts0/10000;
             else         asf->packet_frag_timestamp= AV_NOPTS_VALUE;
         }else
-            url_fskip(pb, asf->packet_replic_size - 8);
+            avio_skip(pb, asf->packet_replic_size - 8);
         rsize += asf->packet_replic_size; // FIXME - check validity
     } else if (asf->packet_replic_size==1){
         // multipacket - frag_offset is beginning timestamp
@@ -895,7 +895,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
             //printf("PacketLeftSize:%d  Pad:%d Pos:%"PRId64"\n", asf->packet_size_left, asf->packet_padsize, url_ftell(pb));
             assert(ret>=0);
             /* fail safe */
-            url_fskip(pb, ret);
+            avio_skip(pb, ret);
 
             asf->packet_pos= url_ftell(pb);
             if (asf->data_object_size != (uint64_t)-1 &&
@@ -914,7 +914,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
                 ) {
                 asf->packet_time_start = 0;
                 /* unhandled packet (should not happen) */
-                url_fskip(pb, asf->packet_frag_size);
+                avio_skip(pb, asf->packet_frag_size);
                 asf->packet_size_left -= asf->packet_frag_size;
                 if(asf->stream_index < 0)
                     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
             if (asf->packet_multi_size < asf->packet_obj_size)
             {
                 asf->packet_time_start = 0;
-                url_fskip(pb, asf->packet_multi_size);
+                avio_skip(pb, asf->packet_multi_size);
                 asf->packet_size_left -= asf->packet_multi_size;
                 continue;
             }
@@ -1146,7 +1146,7 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos,
     if (s->packet_size > 0)
         pos= (pos+s->packet_size-1-s->data_offset)/s->packet_size*s->packet_size+ s->data_offset;
     *ppos= pos;
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
 
 //printf("asf_read_pts\n");
     asf_reset_header(s);
@@ -1188,7 +1188,7 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
     int64_t current_pos= url_ftell(s->pb);
     int i;
 
-    url_fseek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET);
+    avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET);
     ff_get_guid(s->pb, &g);
 
     /* the data object can be followed by other top-level objects,
@@ -1196,10 +1196,10 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
     while (ff_guidcmp(&g, &index_guid)) {
         int64_t gsize= avio_rl64(s->pb);
         if (gsize < 24 || url_feof(s->pb)) {
-            url_fseek(s->pb, current_pos, SEEK_SET);
+            avio_seek(s->pb, current_pos, SEEK_SET);
             return;
         }
-        url_fseek(s->pb, gsize-24, SEEK_CUR);
+        avio_seek(s->pb, gsize-24, SEEK_CUR);
         ff_get_guid(s->pb, &g);
     }
 
@@ -1227,7 +1227,7 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
         }
         asf->index_read= 1;
     }
-    url_fseek(s->pb, current_pos, SEEK_SET);
+    avio_seek(s->pb, current_pos, SEEK_SET);
 }
 
 static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
@@ -1265,7 +1265,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
 
     // various attempts to find key frame have failed so far
     //    asf_reset_header(s);
-    //    url_fseek(s->pb, pos, SEEK_SET);
+    //    avio_seek(s->pb, pos, SEEK_SET);
     //    key_pos = pos;
     //     for(i=0;i<16;i++){
     //         pos = url_ftell(s->pb);
@@ -1286,7 +1286,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
 
         /* do the seek */
         av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos);
-        url_fseek(s->pb, pos, SEEK_SET);
+        avio_seek(s->pb, pos, SEEK_SET);
     }
     asf_reset_header(s);
     return 0;
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index b181f23..267f9b3 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -260,9 +260,9 @@ static void end_header(AVIOContext *pb, int64_t pos)
     int64_t pos1;
 
     pos1 = url_ftell(pb);
-    url_fseek(pb, pos + 16, SEEK_SET);
+    avio_seek(pb, pos + 16, SEEK_SET);
     avio_wl64(pb, pos1 - pos);
-    url_fseek(pb, pos1, SEEK_SET);
+    avio_seek(pb, pos1, SEEK_SET);
 }
 
 /* write an asf chunk (only used in streaming case) */
@@ -443,9 +443,9 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
                 return -1;
             if (wavsize != extra_size) {
                 cur_pos = url_ftell(pb);
-                url_fseek(pb, es_pos, SEEK_SET);
+                avio_seek(pb, es_pos, SEEK_SET);
                 avio_wl32(pb, wavsize); /* wav header len */
-                url_fseek(pb, cur_pos, SEEK_SET);
+                avio_seek(pb, cur_pos, SEEK_SET);
             }
             /* ERROR Correction */
             avio_w8(pb, 0x01);
@@ -530,17 +530,17 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
     if (asf->is_streamed) {
         header_size += 8 + 30 + 50;
 
-        url_fseek(pb, header_offset - 10 - 30, SEEK_SET);
+        avio_seek(pb, header_offset - 10 - 30, SEEK_SET);
         avio_wl16(pb, header_size);
-        url_fseek(pb, header_offset - 2 - 30, SEEK_SET);
+        avio_seek(pb, header_offset - 2 - 30, SEEK_SET);
         avio_wl16(pb, header_size);
 
         header_size -= 8 + 30 + 50;
     }
     header_size += 24 + 6;
-    url_fseek(pb, header_offset - 14, SEEK_SET);
+    avio_seek(pb, header_offset - 14, SEEK_SET);
     avio_wl64(pb, header_size);
-    url_fseek(pb, cur_pos, SEEK_SET);
+    avio_seek(pb, cur_pos, SEEK_SET);
 
     /* movie chunk, followed by packets of packet_size */
     asf->data_offset = cur_pos;
@@ -871,7 +871,7 @@ static int asf_write_trailer(AVFormatContext *s)
     } else {
         /* rewrite an updated header */
         file_size = url_ftell(s->pb);
-        url_fseek(s->pb, 0, SEEK_SET);
+        avio_seek(s->pb, 0, SEEK_SET);
         asf_write_header1(s, file_size, data_size - asf->data_offset);
     }
 
diff --git a/libavformat/au.c b/libavformat/au.c
index 9aed1dc..16b33e7 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -95,9 +95,9 @@ static int au_write_trailer(AVFormatContext *s)
 
         /* update file size */
         file_size = url_ftell(pb);
-        url_fseek(pb, 8, SEEK_SET);
+        avio_seek(pb, 8, SEEK_SET);
         avio_wb32(pb, (uint32_t)(file_size - 24));
-        url_fseek(pb, file_size, SEEK_SET);
+        avio_seek(pb, file_size, SEEK_SET);
 
         put_flush_packet(pb);
     }
@@ -147,7 +147,7 @@ static int au_read_header(AVFormatContext *s,
 
     if (size >= 24) {
         /* skip unused data */
-        url_fseek(pb, size - 24, SEEK_CUR);
+        avio_seek(pb, size - 24, SEEK_CUR);
     }
 
     /* now we are ready: build format streams */
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b2db2dc..6fa6a1d 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -205,13 +205,13 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
                 return -1;
             }
 
-            url_fseek(pb, offset+8, SEEK_SET);
+            avio_seek(pb, offset+8, SEEK_SET);
             avi->odml_depth++;
             read_braindead_odml_indx(s, frame_num);
             avi->odml_depth--;
             frame_num += duration;
 
-            url_fseek(pb, pos, SEEK_SET);
+            avio_seek(pb, pos, SEEK_SET);
         }
     }
     avi->index_loaded=1;
@@ -321,12 +321,12 @@ static void avi_read_nikon(AVFormatContext *s, uint64_t end)
                 }
                 if (name)
                     av_metadata_set2(&s->metadata, name, buffer, 0);
-                url_fskip(s->pb, size);
+                avio_skip(s->pb, size);
             }
             break;
         }
         default:
-            url_fskip(s->pb, size);
+            avio_skip(s->pb, size);
             break;
         }
     }
@@ -392,13 +392,13 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
             unsigned char date[64] = {0};
             size += (size & 1);
             size -= avio_read(pb, date, FFMIN(size, sizeof(date)-1));
-            url_fskip(pb, size);
+            avio_skip(pb, size);
             avi_metadata_creation_time(&s->metadata, date);
             break;
         }
         case MKTAG('d', 'm', 'l', 'h'):
             avi->is_odml = 1;
-            url_fskip(pb, size + (size & 1));
+            avio_skip(pb, size + (size & 1));
             break;
         case MKTAG('a', 'm', 'v', 'h'):
             amv_file_format=1;
@@ -410,13 +410,13 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
             avio_rl32(pb);
             avi->non_interleaved |= avio_rl32(pb) & AVIF_MUSTUSEINDEX;
 
-            url_fskip(pb, 2 * 4);
+            avio_skip(pb, 2 * 4);
             avio_rl32(pb);
             avio_rl32(pb);
             avih_width=avio_rl32(pb);
             avih_height=avio_rl32(pb);
 
-            url_fskip(pb, size - 10 * 4);
+            avio_skip(pb, size - 10 * 4);
             break;
         case MKTAG('s', 't', 'r', 'h'):
             /* stream header */
@@ -425,7 +425,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
             handler = avio_rl32(pb); /* codec tag */
 
             if(tag1 == MKTAG('p', 'a', 'd', 's')){
-                url_fskip(pb, size - 8);
+                avio_skip(pb, size - 8);
                 break;
             }else{
                 stream_index++;
@@ -469,10 +469,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                         goto fail;
                 }
                 s->streams[0]->priv_data = ast;
-                url_fskip(pb, 3 * 4);
+                avio_skip(pb, 3 * 4);
                 ast->scale = avio_rl32(pb);
                 ast->rate = avio_rl32(pb);
-                url_fskip(pb, 4);  /* start time */
+                avio_skip(pb, 4);  /* start time */
 
                 dv_dur = avio_rl32(pb);
                 if (ast->scale > 0 && ast->rate > 0 && dv_dur > 0) {
@@ -485,7 +485,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                  */
 
                 stream_index = s->nb_streams - 1;
-                url_fskip(pb, size - 9*4);
+                avio_skip(pb, size - 9*4);
                 break;
             }
 
@@ -542,12 +542,12 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
             if(ast->sample_size == 0)
                 st->duration = st->nb_frames;
             ast->frame_offset= ast->cum_len;
-            url_fskip(pb, size - 12 * 4);
+            avio_skip(pb, size - 12 * 4);
             break;
         case MKTAG('s', 't', 'r', 'f'):
             /* stream header */
             if (stream_index >= (unsigned)s->nb_streams || avi->dv_demux) {
-                url_fskip(pb, size);
+                avio_skip(pb, size);
             } else {
                 uint64_t cur_pos = url_ftell(pb);
                 if (cur_pos < list_end)
@@ -560,7 +560,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                         st->codec->height=avih_height;
                         st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                         st->codec->codec_id = CODEC_ID_AMV;
-                        url_fskip(pb, size);
+                        avio_skip(pb, size);
                         break;
                     }
                     tag1 = ff_get_bmp_header(pb, st);
@@ -620,7 +620,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     }
                     st->codec->height= FFABS(st->codec->height);
 
-//                    url_fskip(pb, size - 5 * 4);
+//                    avio_skip(pb, size - 5 * 4);
                     break;
                 case AVMEDIA_TYPE_AUDIO:
                     ff_get_wav_header(pb, st->codec, size);
@@ -630,7 +630,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                         ast->sample_size= st->codec->block_align;
                     }
                     if (size&1) /* 2-aligned (fix for Stargate SG-1 - 3x18 - Shades of Grey.avi) */
-                        url_fskip(pb, 1);
+                        avio_skip(pb, 1);
                     /* Force parsing as several audio frames can be in
                      * one packet and timestamps refer to packet start. */
                     st->need_parsing = AVSTREAM_PARSE_TIMESTAMPS;
@@ -658,7 +658,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     st->codec->codec_type = AVMEDIA_TYPE_DATA;
                     st->codec->codec_id= CODEC_ID_NONE;
                     st->codec->codec_tag= 0;
-                    url_fskip(pb, size);
+                    avio_skip(pb, size);
                     break;
                 }
             }
@@ -668,7 +668,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
             if(!url_is_streamed(pb) && !(s->flags & AVFMT_FLAG_IGNIDX)){
                 read_braindead_odml_indx(s, 0);
             }
-            url_fseek(pb, i+size, SEEK_SET);
+            avio_seek(pb, i+size, SEEK_SET);
             break;
         case MKTAG('v', 'p', 'r', 'p'):
             if(stream_index < (unsigned)s->nb_streams && size > 9*4){
@@ -693,7 +693,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                 }
                 size -= 9*4;
             }
-            url_fseek(pb, size, SEEK_CUR);
+            avio_seek(pb, size, SEEK_CUR);
             break;
         case MKTAG('s', 't', 'r', 'n'):
             if(s->nb_streams){
@@ -710,7 +710,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
             }
             /* skip tag */
             size += (size & 1);
-            url_fskip(pb, size);
+            avio_skip(pb, size);
             break;
         }
     }
@@ -762,7 +762,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
             goto error;
 
         ret = avio_get_str16le(pb, desc_len, desc, sizeof(desc));
-        url_fskip(pb, desc_len - ret);
+        avio_skip(pb, desc_len - ret);
         if (*desc)
             av_metadata_set2(&st->metadata, "title", desc, 0);
 
@@ -892,7 +892,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
         if(i>=0){
             int64_t pos= best_st->index_entries[i].pos;
             pos += best_ast->packet_size - best_ast->remaining;
-            url_fseek(s->pb, pos + 8, SEEK_SET);
+            avio_seek(s->pb, pos + 8, SEEK_SET);
 //        av_log(s, AV_LOG_DEBUG, "pos=%"PRId64"\n", pos);
 
             assert(best_ast->remaining <= best_ast->packet_size);
@@ -1008,14 +1008,14 @@ resync:
         //parse JUNK
            ||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K')
            ||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){
-            url_fskip(pb, size);
+            avio_skip(pb, size);
 //av_log(s, AV_LOG_DEBUG, "SKIP\n");
             goto resync;
         }
 
         //parse stray LIST
         if(d[0] == 'L' && d[1] == 'I' && d[2] == 'S' && d[3] == 'T'){
-            url_fskip(pb, 4);
+            avio_skip(pb, 4);
             goto resync;
         }
 
@@ -1026,7 +1026,7 @@ resync:
 
         //detect ##ix chunk and skip
         if(d[2] == 'i' && d[3] == 'x' && n < s->nb_streams){
-            url_fskip(pb, size);
+            avio_skip(pb, size);
             goto resync;
         }
 
@@ -1060,7 +1060,7 @@ resync:
                /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering
                || st->discard >= AVDISCARD_ALL){
                 ast->frame_offset += get_duration(ast, size);
-                url_fskip(pb, size);
+                avio_skip(pb, size);
                 goto resync;
             }
 
@@ -1174,7 +1174,7 @@ static int guess_ni_flag(AVFormatContext *s){
 
         if(n >= 2){
             int64_t pos= st->index_entries[0].pos;
-            url_fseek(s->pb, pos + 4, SEEK_SET);
+            avio_seek(s->pb, pos + 4, SEEK_SET);
             size= avio_rl32(s->pb);
             if(pos + size > st->index_entries[1].pos)
                 last_start= INT64_MAX;
@@ -1185,7 +1185,7 @@ static int guess_ni_flag(AVFormatContext *s){
         if(st->index_entries[n-1].pos < first_end)
             first_end= st->index_entries[n-1].pos;
     }
-    url_fseek(s->pb, oldpos, SEEK_SET);
+    avio_seek(s->pb, oldpos, SEEK_SET);
     return last_start > first_end;
 }
 
@@ -1197,7 +1197,7 @@ static int avi_load_index(AVFormatContext *s)
     int64_t pos= url_ftell(pb);
     int ret = -1;
 
-    if (url_fseek(pb, avi->movi_end, SEEK_SET) < 0)
+    if (avio_seek(pb, avi->movi_end, SEEK_SET) < 0)
         goto the_end; // maybe truncated file
 #ifdef DEBUG_SEEK
     printf("movi_end=0x%"PRIx64"\n", avi->movi_end);
@@ -1225,13 +1225,13 @@ static int avi_load_index(AVFormatContext *s)
         default:
         skip:
             size += (size & 1);
-            if (url_fseek(pb, size, SEEK_CUR) < 0)
+            if (avio_seek(pb, size, SEEK_CUR) < 0)
                 goto the_end; // something is wrong here
             break;
         }
     }
  the_end:
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
     return ret;
 }
 
@@ -1282,7 +1282,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
         /* DV demux so it can synthesize correct timestamps.        */
         dv_offset_reset(avi->dv_demux, timestamp);
 
-        url_fseek(s->pb, pos, SEEK_SET);
+        avio_seek(s->pb, pos, SEEK_SET);
         avi->stream_index= -1;
         return 0;
     }
@@ -1324,7 +1324,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
     }
 
     /* do the seek */
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
     avi->stream_index= -1;
     return 0;
 }
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index c161133..badeacb 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -130,7 +130,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id)
 
         assert(avist->frames_hdr_strm);
         stream = s->streams[n]->codec;
-        url_fseek(pb, avist->frames_hdr_strm, SEEK_SET);
+        avio_seek(pb, avist->frames_hdr_strm, SEEK_SET);
         ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
         if(au_ssize == 0) {
             avio_wl32(pb, avist->packet_count);
@@ -142,10 +142,10 @@ static int avi_write_counters(AVFormatContext* s, int riff_id)
     }
     if(riff_id == 1) {
         assert(avi->frames_hdr_all);
-        url_fseek(pb, avi->frames_hdr_all, SEEK_SET);
+        avio_seek(pb, avi->frames_hdr_all, SEEK_SET);
         avio_wl32(pb, nb_frames);
     }
-    url_fseek(pb, file_size, SEEK_SET);
+    avio_seek(pb, file_size, SEEK_SET);
 
     return 0;
 }
@@ -442,16 +442,16 @@ static int avi_write_ix(AVFormatContext *s)
          pos = url_ftell(pb);
 
          /* Updating one entry in the AVI OpenDML master index */
-         url_fseek(pb, avist->indexes.indx_start - 8, SEEK_SET);
+         avio_seek(pb, avist->indexes.indx_start - 8, SEEK_SET);
          ffio_wfourcc(pb, "indx");            /* enabling this entry */
-         url_fskip(pb, 8);
+         avio_skip(pb, 8);
          avio_wl32(pb, avi->riff_id);         /* nEntriesInUse */
-         url_fskip(pb, 16*avi->riff_id);
+         avio_skip(pb, 16*avi->riff_id);
          avio_wl64(pb, ix);                   /* qwOffset */
          avio_wl32(pb, pos - ix);             /* dwSize */
          avio_wl32(pb, avist->indexes.entry); /* dwDuration */
 
-         url_fseek(pb, pos, SEEK_SET);
+         avio_seek(pb, pos, SEEK_SET);
     }
     return 0;
 }
@@ -601,9 +601,9 @@ static int avi_write_trailer(AVFormatContext *s)
             ff_end_tag(pb, avi->riff_start);
 
             file_size = url_ftell(pb);
-            url_fseek(pb, avi->odml_list - 8, SEEK_SET);
+            avio_seek(pb, avi->odml_list - 8, SEEK_SET);
             ffio_wfourcc(pb, "LIST"); /* Making this AVI OpenDML one */
-            url_fskip(pb, 16);
+            avio_skip(pb, 16);
 
             for (n=nb_frames=0;n<s->nb_streams;n++) {
                 AVCodecContext *stream = s->streams[n]->codec;
@@ -619,7 +619,7 @@ static int avi_write_trailer(AVFormatContext *s)
                 }
             }
             avio_wl32(pb, nb_frames);
-            url_fseek(pb, file_size, SEEK_SET);
+            avio_seek(pb, file_size, SEEK_SET);
 
             avi_write_counters(s, avi->riff_id);
         }
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 613d77d..38fdef7 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -420,6 +420,8 @@ attribute_deprecated void         put_tag(AVIOContext *s, const char *tag);
  */
 attribute_deprecated int url_fopen( AVIOContext **s, const char *url, int flags);
 attribute_deprecated int url_fclose(AVIOContext *s);
+attribute_deprecated int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
+attribute_deprecated int url_fskip(AVIOContext *s, int64_t offset);
 /**
  * @}
  */
@@ -465,14 +467,14 @@ int avio_put_str16le(AVIOContext *s, const char *str);
  * fseek() equivalent for AVIOContext.
  * @return new position or AVERROR.
  */
-int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
+int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
 
 /**
  * Skip given number of bytes forward.
  * @param offset number of bytes
  * @return 0 on success, <0 on error
  */
-int url_fskip(AVIOContext *s, int64_t offset);
+int avio_skip(AVIOContext *s, int64_t offset);
 
 /**
  * ftell() equivalent for AVIOContext.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index f53ec56..cbd7947 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -176,7 +176,7 @@ void put_flush_packet(AVIOContext *s)
     s->must_flush = 0;
 }
 
-int64_t url_fseek(AVIOContext *s, int64_t offset, int whence)
+int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
 {
     int64_t offset1;
     int64_t pos;
@@ -233,15 +233,15 @@ int64_t url_fseek(AVIOContext *s, int64_t offset, int whence)
     return offset;
 }
 
-int url_fskip(AVIOContext *s, int64_t offset)
+int avio_skip(AVIOContext *s, int64_t offset)
 {
-    int64_t ret = url_fseek(s, offset, SEEK_CUR);
+    int64_t ret = avio_seek(s, offset, SEEK_CUR);
     return ret < 0 ? ret : 0;
 }
 
 int64_t url_ftell(AVIOContext *s)
 {
-    return url_fseek(s, 0, SEEK_CUR);
+    return avio_seek(s, 0, SEEK_CUR);
 }
 
 int64_t url_fsize(AVIOContext *s)
@@ -365,6 +365,14 @@ int url_fclose(AVIOContext *s)
 {
     return avio_close(s);
 }
+int64_t url_fseek(AVIOContext *s, int64_t offset, int whence)
+{
+    return avio_seek(s, offset, whence);
+}
+int url_fskip(AVIOContext *s, int64_t offset)
+{
+    return avio_skip(s, offset);
+}
 #endif
 
 int avio_put_str(AVIOContext *s, const char *str)
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 0ba5ceb..612dc1c 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -61,7 +61,7 @@ static int avs_read_header(AVFormatContext * s, AVFormatParameters * ap)
 
     s->ctx_flags |= AVFMTCTX_NOHEADER;
 
-    url_fskip(s->pb, 4);
+    avio_skip(s->pb, 4);
     avs->width = avio_rl16(s->pb);
     avs->height = avio_rl16(s->pb);
     avs->bits_per_sample = avio_rl16(s->pb);
@@ -204,7 +204,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
                 break;
 
             default:
-                url_fskip(s->pb, size - 4);
+                avio_skip(s->pb, size - 4);
             }
         }
     }
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 40d0e62..00b3ea2 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -67,7 +67,7 @@ static int vid_read_header(AVFormatContext *s,
     *    bytes: 'V' 'I' 'D'
     *    int16s: always_512, nframes, width, height, delay, always_14
     */
-    url_fseek(pb, 5, SEEK_CUR);
+    avio_seek(pb, 5, SEEK_CUR);
     vid->nframes = avio_rl16(pb);
 
     stream = av_new_stream(s, 0);
@@ -146,7 +146,7 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
         if(bytes_copied == npixels){ // sometimes no stop character is given, need to keep track of bytes copied
             // may contain a 0 byte even if read all pixels
             if(avio_r8(pb))
-                url_fseek(pb, -1, SEEK_CUR);
+                avio_seek(pb, -1, SEEK_CUR);
             break;
         }
         if(bytes_copied > npixels)
@@ -185,7 +185,7 @@ static int vid_read_packet(AVFormatContext *s,
     block_type = avio_r8(pb);
     switch(block_type){
         case PALETTE_BLOCK:
-            url_fseek(pb, -1, SEEK_CUR);     // include block type
+            avio_seek(pb, -1, SEEK_CUR);     // include block type
             ret_value = av_get_packet(pb, pkt, 3 * 256 + 1);
             if(ret_value != 3 * 256 + 1){
                 av_free_packet(pkt);
diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index 7313e7b..843ba99 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -65,19 +65,19 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
         return AVERROR(ENOMEM);
 
     /* Set the total number of frames. */
-    url_fskip(pb, 8);
+    avio_skip(pb, 8);
     chunk_header           = avio_rl32(pb);
     bfi->nframes           = avio_rl32(pb);
     avio_rl32(pb);
     avio_rl32(pb);
     avio_rl32(pb);
     fps                    = avio_rl32(pb);
-    url_fskip(pb, 12);
+    avio_skip(pb, 12);
     vstream->codec->width  = avio_rl32(pb);
     vstream->codec->height = avio_rl32(pb);
 
     /*Load the palette to extradata */
-    url_fskip(pb, 8);
+    avio_skip(pb, 8);
     vstream->codec->extradata      = av_malloc(768);
     vstream->codec->extradata_size = 768;
     avio_read(pb, vstream->codec->extradata,
@@ -98,7 +98,7 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
     astream->codec->bits_per_coded_sample = 8;
     astream->codec->bit_rate        =
         astream->codec->sample_rate * astream->codec->bits_per_coded_sample;
-    url_fseek(pb, chunk_header - 3, SEEK_SET);
+    avio_seek(pb, chunk_header - 3, SEEK_SET);
     av_set_pts_info(astream, 64, 1, astream->codec->sample_rate);
     return 0;
 }
diff --git a/libavformat/bink.c b/libavformat/bink.c
index 79c3a25..616afed 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -98,7 +98,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(EIO);
     }
 
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
 
     vst->codec->width  = avio_rl32(pb);
     vst->codec->height = avio_rl32(pb);
@@ -127,7 +127,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     }
 
     if (bink->num_audio_tracks) {
-        url_fskip(pb, 4 * bink->num_audio_tracks);
+        avio_skip(pb, 4 * bink->num_audio_tracks);
 
         for (i = 0; i < bink->num_audio_tracks; i++) {
             ast = av_new_stream(s, 1);
@@ -169,7 +169,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
                            keyframe ? AVINDEX_KEYFRAME : 0);
     }
 
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
 
     bink->current_track = -1;
     return 0;
@@ -225,7 +225,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
                     AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codec->channels);
             return 0;
         } else {
-            url_fseek(pb, audio_size, SEEK_CUR);
+            avio_seek(pb, audio_size, SEEK_CUR);
         }
     }
 
@@ -251,7 +251,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in
         return -1;
 
     /* seek to the first frame */
-    url_fseek(s->pb, vst->index_entries[0].pos, SEEK_SET);
+    avio_seek(s->pb, vst->index_entries[0].pos, SEEK_SET);
     bink->video_pts = 0;
     memset(bink->audio_pts, 0, sizeof(bink->audio_pts));
     bink->current_track = -1;
diff --git a/libavformat/c93.c b/libavformat/c93.c
index 3e3cd9c..270a09b 100644
--- a/libavformat/c93.c
+++ b/libavformat/c93.c
@@ -122,7 +122,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
                     return AVERROR(ENOMEM);
                 c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             }
-            url_fskip(pb, 26); /* VOC header */
+            avio_skip(pb, 26); /* VOC header */
             ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);
             if (ret > 0) {
                 pkt->stream_index = 1;
@@ -140,13 +140,13 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     if (c93->current_frame == 0) {
-        url_fseek(pb, br->index * 2048, SEEK_SET);
+        avio_seek(pb, br->index * 2048, SEEK_SET);
         for (i = 0; i < 32; i++) {
             c93->frame_offsets[i] = avio_rl32(pb);
         }
     }
 
-    url_fseek(pb,br->index * 2048 +
+    avio_seek(pb,br->index * 2048 +
             c93->frame_offsets[c93->current_frame], SEEK_SET);
     datasize = avio_rl16(pb); /* video frame size */
 
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index 86f1005..dbe7cc8 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -114,22 +114,22 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
             av_log(s, AV_LOG_ERROR, "invalid AAC magic cookie\n");
             return AVERROR_INVALIDDATA;
         }
-        url_fskip(pb, skip);
+        avio_skip(pb, skip);
     } else if (st->codec->codec_id == CODEC_ID_ALAC) {
 #define ALAC_PREAMBLE 12
 #define ALAC_HEADER   36
         if (size < ALAC_PREAMBLE + ALAC_HEADER) {
             av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n");
-            url_fskip(pb, size);
+            avio_skip(pb, size);
             return AVERROR_INVALIDDATA;
         }
-        url_fskip(pb, ALAC_PREAMBLE);
+        avio_skip(pb, ALAC_PREAMBLE);
         st->codec->extradata = av_mallocz(ALAC_HEADER + FF_INPUT_BUFFER_PADDING_SIZE);
         if (!st->codec->extradata)
             return AVERROR(ENOMEM);
         avio_read(pb, st->codec->extradata, ALAC_HEADER);
         st->codec->extradata_size = ALAC_HEADER;
-        url_fskip(pb, size - ALAC_PREAMBLE - ALAC_HEADER);
+        avio_skip(pb, size - ALAC_PREAMBLE - ALAC_HEADER);
     } else {
         st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
         if (!st->codec->extradata)
@@ -201,7 +201,7 @@ static int read_header(AVFormatContext *s,
     int found_data, ret;
     int64_t size;
 
-    url_fskip(pb, 8); /* magic, version, file flags */
+    avio_skip(pb, 8); /* magic, version, file flags */
 
     /* audio description chunk */
     if (avio_rb32(pb) != MKBETAG('d','e','s','c')) {
@@ -233,11 +233,11 @@ static int read_header(AVFormatContext *s,
 
         switch (tag) {
         case MKBETAG('d','a','t','a'):
-            url_fskip(pb, 4); /* edit count */
+            avio_skip(pb, 4); /* edit count */
             caf->data_start = url_ftell(pb);
             caf->data_size  = size < 0 ? -1 : size - 4;
             if (caf->data_size > 0 && !url_is_streamed(pb))
-                url_fskip(pb, caf->data_size);
+                avio_skip(pb, caf->data_size);
             found_data = 1;
             break;
 
@@ -265,7 +265,7 @@ static int read_header(AVFormatContext *s,
         case MKBETAG('f','r','e','e'):
             if (size < 0)
                 return AVERROR_INVALIDDATA;
-            url_fskip(pb, size);
+            avio_skip(pb, size);
             break;
         }
     }
@@ -292,7 +292,7 @@ static int read_header(AVFormatContext *s,
 
     /* position the stream at the start of data */
     if (caf->data_size >= 0)
-        url_fseek(pb, caf->data_start, SEEK_SET);
+        avio_seek(pb, caf->data_start, SEEK_SET);
 
     return 0;
 }
@@ -377,7 +377,7 @@ static int read_seek(AVFormatContext *s, int stream_index,
         return -1;
     }
 
-    url_fseek(s->pb, pos + caf->data_start, SEEK_SET);
+    avio_seek(s->pb, pos + caf->data_start, SEEK_SET);
     return 0;
 }
 
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 0598607..cdc5f76 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -419,7 +419,7 @@ static int dv_read_header(AVFormatContext *s,
         if (state == 0x003f0700 || state == 0xff3f0700)
             marker_pos = url_ftell(s->pb);
         if (state == 0xff3f0701 && url_ftell(s->pb) - marker_pos == 80) {
-            url_fseek(s->pb, -163, SEEK_CUR);
+            avio_seek(s->pb, -163, SEEK_CUR);
             state = avio_rb32(s->pb);
             break;
         }
@@ -428,7 +428,7 @@ static int dv_read_header(AVFormatContext *s,
     AV_WB32(c->buf, state);
 
     if (avio_read(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) <= 0 ||
-        url_fseek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
+        avio_seek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
         return AVERROR(EIO);
 
     c->dv_demux->sys = ff_dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES);
@@ -473,7 +473,7 @@ static int dv_read_seek(AVFormatContext *s, int stream_index,
 
     dv_offset_reset(c, offset / c->sys->frame_size);
 
-    offset = url_fseek(s->pb, offset, SEEK_SET);
+    offset = avio_seek(s->pb, offset, SEEK_SET);
     return (offset < 0) ? offset : 0;
 }
 
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 188fc29..8778609 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -96,7 +96,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
         c->has_sound = 1;
         size = avio_rb32(pb);
         c->vidpos = url_ftell(pb) + size;
-        url_fskip(pb, 16);
+        avio_skip(pb, 16);
         fsize = avio_rl32(pb);
 
         ast = av_new_stream(s, 0);
@@ -108,14 +108,14 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
             tag = avio_rl32(pb);
             fsize = avio_rl32(pb);
             if(tag == MKTAG('d', 'a', 't', 'a')) break;
-            url_fskip(pb, fsize);
+            avio_skip(pb, fsize);
         }
         c->bpc = (fsize + c->frames - 1) / c->frames;
         if(ast->codec->block_align)
             c->bpc = ((c->bpc + ast->codec->block_align - 1) / ast->codec->block_align) * ast->codec->block_align;
         c->bytes_left = fsize;
         c->wavpos = url_ftell(pb);
-        url_fseek(pb, c->vidpos, SEEK_SET);
+        avio_seek(pb, c->vidpos, SEEK_SET);
     }
 
     /* now we are ready: build format streams */
@@ -151,7 +151,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     if(!c->readvid && c->has_sound && c->bytes_left){
         c->readvid = 1;
-        url_fseek(s->pb, c->wavpos, SEEK_SET);
+        avio_seek(s->pb, c->wavpos, SEEK_SET);
         size = FFMIN(c->bytes_left, c->bpc);
         ret = av_get_packet(s->pb, pkt, size);
         pkt->stream_index = 1;
@@ -161,7 +161,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
         c->wavpos = url_ftell(s->pb);
         return 0;
     }
-    url_fseek(s->pb, c->vidpos, SEEK_SET);
+    avio_seek(s->pb, c->vidpos, SEEK_SET);
     while(!url_feof(s->pb) && c->frames){
         avio_read(s->pb, buf, 4);
         switch(AV_RL32(buf)){
diff --git a/libavformat/eacdata.c b/libavformat/eacdata.c
index 6f3564e..7b109ff 100644
--- a/libavformat/eacdata.c
+++ b/libavformat/eacdata.c
@@ -62,7 +62,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap)
     };
 
     sample_rate = avio_rb16(pb);
-    url_fskip(pb, 12);
+    avio_skip(pb, 12);
 
     st = av_new_stream(s, 0);
     if (!st)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 6179d22..734600b 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -222,7 +222,7 @@ static int process_audio_header_eacs(AVFormatContext *s)
     ea->bytes        = avio_r8(pb);   /* 1=8-bit, 2=16-bit */
     ea->num_channels = avio_r8(pb);
     compression_type = avio_r8(pb);
-    url_fskip(pb, 13);
+    avio_skip(pb, 13);
 
     switch (compression_type) {
     case 0:
@@ -261,7 +261,7 @@ static int process_video_header_mdec(AVFormatContext *s)
 {
     EaDemuxContext *ea = s->priv_data;
     AVIOContext *pb = s->pb;
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
     ea->width  = avio_rl16(pb);
     ea->height = avio_rl16(pb);
     ea->time_base = (AVRational){1,15};
@@ -274,7 +274,7 @@ static int process_video_header_vp6(AVFormatContext *s)
     EaDemuxContext *ea = s->priv_data;
     AVIOContext *pb = s->pb;
 
-    url_fskip(pb, 16);
+    avio_skip(pb, 16);
     ea->time_base.den = avio_rl32(pb);
     ea->time_base.num = avio_rl32(pb);
     ea->video_codec = CODEC_ID_VP6;
@@ -316,7 +316,7 @@ static int process_ea_header(AVFormatContext *s) {
             case SHEN_TAG :
                 blockid = avio_rl32(pb);
                 if (blockid == GSTR_TAG) {
-                    url_fskip(pb, 4);
+                    avio_skip(pb, 4);
                 } else if ((blockid & 0xFFFF)!=PT00_TAG) {
                     av_log (s, AV_LOG_ERROR, "unknown SCHl headerid\n");
                     return 0;
@@ -369,10 +369,10 @@ static int process_ea_header(AVFormatContext *s) {
             return err;
         }
 
-        url_fseek(pb, startpos + size, SEEK_SET);
+        avio_seek(pb, startpos + size, SEEK_SET);
     }
 
-    url_fseek(pb, 0, SEEK_SET);
+    avio_seek(pb, 0, SEEK_SET);
 
     return 1;
 }
@@ -474,19 +474,19 @@ static int ea_read_packet(AVFormatContext *s,
         /* audio data */
         case ISNh_TAG:
             /* header chunk also contains data; skip over the header portion*/
-            url_fskip(pb, 32);
+            avio_skip(pb, 32);
             chunk_size -= 32;
         case ISNd_TAG:
         case SCDl_TAG:
         case SNDC_TAG:
         case SDEN_TAG:
             if (!ea->audio_codec) {
-                url_fskip(pb, chunk_size);
+                avio_skip(pb, chunk_size);
                 break;
             } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||
                        ea->audio_codec == CODEC_ID_MP3) {
                 num_samples = avio_rl32(pb);
-                url_fskip(pb, 8);
+                avio_skip(pb, 8);
                 chunk_size -= 12;
             }
             ret = av_get_packet(pb, pkt, chunk_size);
@@ -536,12 +536,12 @@ static int ea_read_packet(AVFormatContext *s,
         case fVGT_TAG:
         case MADm_TAG:
         case MADe_TAG:
-            url_fseek(pb, -8, SEEK_CUR);     // include chunk preamble
+            avio_seek(pb, -8, SEEK_CUR);     // include chunk preamble
             chunk_size += 8;
             goto get_video_packet;
 
         case mTCD_TAG:
-            url_fseek(pb, 8, SEEK_CUR);  // skip ea dct header
+            avio_seek(pb, 8, SEEK_CUR);  // skip ea dct header
             chunk_size -= 8;
             goto get_video_packet;
 
@@ -560,7 +560,7 @@ get_video_packet:
             break;
 
         default:
-            url_fseek(pb, chunk_size, SEEK_CUR);
+            avio_seek(pb, chunk_size, SEEK_CUR);
             break;
         }
     }
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 1ae1422..b49cc16 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -118,7 +118,7 @@ static int ffm_read_data(AVFormatContext *s,
             len = size;
         if (len == 0) {
             if (url_ftell(pb) == ffm->file_size)
-                url_fseek(pb, ffm->packet_size, SEEK_SET);
+                avio_seek(pb, ffm->packet_size, SEEK_SET);
     retry_read:
             id = avio_rb16(pb); /* PACKET_ID */
             if (id != PACKET_ID)
@@ -137,7 +137,7 @@ static int ffm_read_data(AVFormatContext *s,
                 if (!frame_offset) {
                     /* This packet has no frame headers in it */
                     if (url_ftell(pb) >= ffm->packet_size * 3) {
-                        url_fseek(pb, -ffm->packet_size * 2, SEEK_CUR);
+                        avio_seek(pb, -ffm->packet_size * 2, SEEK_CUR);
                         goto retry_read;
                     }
                     /* This is bad, we cannot find a valid frame header */
@@ -178,7 +178,7 @@ static void ffm_seek1(AVFormatContext *s, int64_t pos1)
 #ifdef DEBUG_SEEK
     av_log(s, AV_LOG_DEBUG, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
 #endif
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
 }
 
 static int64_t get_dts(AVFormatContext *s, int64_t pos)
@@ -187,7 +187,7 @@ static int64_t get_dts(AVFormatContext *s, int64_t pos)
     int64_t dts;
 
     ffm_seek1(s, pos);
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
     dts = avio_rb64(pb);
 #ifdef DEBUG_SEEK
     av_log(s, AV_LOG_DEBUG, "dts=%0.6f\n", dts / 1000000.0);
@@ -248,7 +248,7 @@ static void adjust_write_index(AVFormatContext *s)
     //printf("pts range %0.6f - %0.6f\n", get_dts(s, 0) / 1000000. , get_dts(s, ffm->file_size - 2 * FFM_PACKET_SIZE) / 1000000. );
 
  end:
-    url_fseek(pb, ptr, SEEK_SET);
+    avio_seek(pb, ptr, SEEK_SET);
 }
 
 
diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c
index 87219c8..7f14802 100644
--- a/libavformat/filmstripdec.c
+++ b/libavformat/filmstripdec.c
@@ -43,7 +43,7 @@ static int read_header(AVFormatContext *s,
     if (url_is_streamed(s->pb))
         return AVERROR(EIO);
 
-    url_fseek(pb, url_fsize(pb) - 36, SEEK_SET);
+    avio_seek(pb, url_fsize(pb) - 36, SEEK_SET);
     if (avio_rb32(pb) != RAND_TAG) {
         av_log(s, AV_LOG_ERROR, "magic number not found");
         return AVERROR_INVALIDDATA;
@@ -59,7 +59,7 @@ static int read_header(AVFormatContext *s,
         return AVERROR_INVALIDDATA;
     }
 
-    url_fskip(pb, 2);
+    avio_skip(pb, 2);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_RAWVIDEO;
     st->codec->pix_fmt    = PIX_FMT_RGBA;
@@ -69,7 +69,7 @@ static int read_header(AVFormatContext *s,
     film->leading         = avio_rb16(pb);
     av_set_pts_info(st, 64, 1, avio_rb16(pb));
 
-    url_fseek(pb, 0, SEEK_SET);
+    avio_seek(pb, 0, SEEK_SET);
 
     return 0;
 }
@@ -84,7 +84,7 @@ static int read_packet(AVFormatContext *s,
         return AVERROR(EIO);
     pkt->dts = url_ftell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);
     pkt->size = av_get_packet(s->pb, pkt, st->codec->width * st->codec->height * 4);
-    url_fskip(s->pb, st->codec->width * film->leading * 4);
+    avio_skip(s->pb, st->codec->width * film->leading * 4);
     if (pkt->size < 0)
         return pkt->size;
     pkt->flags |= AV_PKT_FLAG_KEY;
@@ -94,7 +94,7 @@ static int read_packet(AVFormatContext *s,
 static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 {
     AVStream *st = s->streams[stream_index];
-    url_fseek(s->pb, FFMAX(timestamp, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);
+    avio_seek(s->pb, FFMAX(timestamp, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);
     return 0;
 }
 
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index bed9863..73eeacb 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -41,7 +41,7 @@ static int flac_read_header(AVFormatContext *s,
 
     /* if fLaC marker is not found, assume there is no header */
     if (avio_rl32(s->pb) != MKTAG('f','L','a','C')) {
-        url_fseek(s->pb, -4, SEEK_CUR);
+        avio_seek(s->pb, -4, SEEK_CUR);
         return 0;
     }
 
@@ -65,7 +65,7 @@ static int flac_read_header(AVFormatContext *s,
             break;
         /* skip metadata block for unsupported types */
         default:
-            ret = url_fseek(s->pb, metadata_size, SEEK_CUR);
+            ret = avio_seek(s->pb, metadata_size, SEEK_CUR);
             if (ret < 0)
                 return ret;
         }
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index d11d75d..cfd9e09 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -101,9 +101,9 @@ static int flac_write_trailer(struct AVFormatContext *s)
     if (!url_is_streamed(pb)) {
         /* rewrite the STREAMINFO header block data */
         file_size = url_ftell(pb);
-        url_fseek(pb, 8, SEEK_SET);
+        avio_seek(pb, 8, SEEK_SET);
         avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE);
-        url_fseek(pb, file_size, SEEK_SET);
+        avio_seek(pb, file_size, SEEK_SET);
         put_flush_packet(pb);
     } else {
         av_log(s, AV_LOG_WARNING, "unable to rewrite FLAC header.\n");
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 2f6e218..cdbd9c8 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -135,7 +135,7 @@ static int flic_read_header(AVFormatContext *s,
         return AVERROR(EIO);
     }
 
-    url_fseek(pb, -FLIC_PREAMBLE_SIZE, SEEK_CUR);
+    avio_seek(pb, -FLIC_PREAMBLE_SIZE, SEEK_CUR);
 
     /* Time to figure out the framerate:
      * If the first preamble's magic number is 0xAAAA then this file is from
@@ -173,7 +173,7 @@ static int flic_read_header(AVFormatContext *s,
         av_set_pts_info(st, 64, FLIC_MC_SPEED, 70);
 
         /* rewind the stream since the first chunk is at offset 12 */
-        url_fseek(pb, 12, SEEK_SET);
+        avio_seek(pb, 12, SEEK_SET);
 
         /* send over abbreviated FLIC header chunk */
         av_free(st->codec->extradata);
@@ -239,7 +239,7 @@ static int flic_read_packet(AVFormatContext *s,
             }
 
             /* skip useless 10B sub-header (yes, it's not accounted for in the chunk header) */
-            url_fseek(pb, 10, SEEK_CUR);
+            avio_seek(pb, 10, SEEK_CUR);
 
             pkt->stream_index = flic->audio_stream_index;
             pkt->pos = url_ftell(pb);
@@ -253,7 +253,7 @@ static int flic_read_packet(AVFormatContext *s,
             packet_read = 1;
         } else {
             /* not interested in this chunk */
-            url_fseek(pb, size - 6, SEEK_CUR);
+            avio_seek(pb, size - 6, SEEK_CUR);
         }
     }
 
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index e42598d..07428e7 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -113,7 +113,7 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co
 static int amf_get_string(AVIOContext *ioc, char *buffer, int buffsize) {
     int length = avio_rb16(ioc);
     if(length >= buffsize) {
-        url_fskip(ioc, length);
+        avio_skip(ioc, length);
         return -1;
     }
 
@@ -149,7 +149,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
             unsigned int keylen;
 
             while(url_ftell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) {
-                url_fskip(ioc, keylen); //skip key string
+                avio_skip(ioc, keylen); //skip key string
                 if(amf_parse_object(s, NULL, NULL, NULL, max_pos, depth + 1) < 0)
                     return -1; //if we couldn't skip, bomb out.
             }
@@ -162,7 +162,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
         case AMF_DATA_TYPE_UNSUPPORTED:
             break; //these take up no additional space
         case AMF_DATA_TYPE_MIXEDARRAY:
-            url_fskip(ioc, 4); //skip 32-bit max array index
+            avio_skip(ioc, 4); //skip 32-bit max array index
             while(url_ftell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) {
                 //this is the only case in which we would want a nested parse to not skip over the object
                 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
         }
             break;
         case AMF_DATA_TYPE_DATE:
-            url_fskip(ioc, 8 + 2); //timestamp (double) and UTC offset (int16)
+            avio_skip(ioc, 8 + 2); //timestamp (double) and UTC offset (int16)
             break;
         default: //unsupported type, we couldn't skip
             return -1;
@@ -254,7 +254,7 @@ static int flv_read_header(AVFormatContext *s,
 {
     int offset, flags;
 
-    url_fskip(s->pb, 4);
+    avio_skip(s->pb, 4);
     flags = avio_r8(s->pb);
     /* old flvtool cleared this field */
     /* FIXME: better fix needed */
@@ -277,8 +277,8 @@ static int flv_read_header(AVFormatContext *s,
     }
 
     offset = avio_rb32(s->pb);
-    url_fseek(s->pb, offset, SEEK_SET);
-    url_fskip(s->pb, 4);
+    avio_seek(s->pb, offset, SEEK_SET);
+    avio_skip(s->pb, 4);
 
     s->start_time = 0;
 
@@ -304,7 +304,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
     int64_t dts, pts = AV_NOPTS_VALUE;
     AVStream *st = NULL;
 
- for(;;url_fskip(s->pb, 4)){ /* pkt size is repeated at end. skip it */
+ for(;;avio_skip(s->pb, 4)){ /* pkt size is repeated at end. skip it */
     pos = url_ftell(s->pb);
     type = avio_r8(s->pb);
     size = avio_rb24(s->pb);
@@ -313,7 +313,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
 //    av_log(s, AV_LOG_DEBUG, "type:%d, size:%d, dts:%d\n", type, size, dts);
     if (url_feof(s->pb))
         return AVERROR_EOF;
-    url_fskip(s->pb, 3); /* stream id, always 0 */
+    avio_skip(s->pb, 3); /* stream id, always 0 */
     flags = 0;
 
     if(size == 0)
@@ -337,7 +337,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
         else /* skip packet */
             av_log(s, AV_LOG_DEBUG, "skipping flv packet: type %d, size %d, flags %d\n", type, size, flags);
     skip:
-        url_fseek(s->pb, next, SEEK_SET);
+        avio_seek(s->pb, next, SEEK_SET);
         continue;
     }
 
@@ -361,7 +361,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
        ||(st->discard >= AVDISCARD_BIDIR  &&  ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_DISP_INTER && !is_audio))
        || st->discard >= AVDISCARD_ALL
        ){
-        url_fseek(s->pb, next, SEEK_SET);
+        avio_seek(s->pb, next, SEEK_SET);
         continue;
     }
     if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY)
@@ -374,15 +374,15 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
         int size;
         const int64_t pos= url_ftell(s->pb);
         const int64_t fsize= url_fsize(s->pb);
-        url_fseek(s->pb, fsize-4, SEEK_SET);
+        avio_seek(s->pb, fsize-4, SEEK_SET);
         size= avio_rb32(s->pb);
-        url_fseek(s->pb, fsize-3-size, SEEK_SET);
+        avio_seek(s->pb, fsize-3-size, SEEK_SET);
         if(size == avio_rb24(s->pb) + 11){
             uint32_t ts = avio_rb24(s->pb);
             ts |= avio_r8(s->pb) << 24;
             s->duration = ts * (int64_t)AV_TIME_BASE / 1000;
         }
-        url_fseek(s->pb, pos, SEEK_SET);
+        avio_seek(s->pb, pos, SEEK_SET);
     }
 
     if(is_audio){
@@ -454,7 +454,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
         pkt->flags |= AV_PKT_FLAG_KEY;
 
 leave:
-    url_fskip(s->pb, 4);
+    avio_skip(s->pb, 4);
     return ret;
 }
 
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 4d49a96..7dd47da 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -289,9 +289,9 @@ static int flv_write_header(AVFormatContext *s)
 
     /* write total size of tag */
     data_size= url_ftell(pb) - metadata_size_pos - 10;
-    url_fseek(pb, metadata_size_pos, SEEK_SET);
+    avio_seek(pb, metadata_size_pos, SEEK_SET);
     avio_wb24(pb, data_size);
-    url_fseek(pb, data_size + 10 - 3, SEEK_CUR);
+    avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
     avio_wb32(pb, data_size + 11);
 
     for (i = 0; i < s->nb_streams; i++) {
@@ -316,9 +316,9 @@ static int flv_write_header(AVFormatContext *s)
                 ff_isom_write_avcc(pb, enc->extradata, enc->extradata_size);
             }
             data_size = url_ftell(pb) - pos;
-            url_fseek(pb, -data_size - 10, SEEK_CUR);
+            avio_seek(pb, -data_size - 10, SEEK_CUR);
             avio_wb24(pb, data_size);
-            url_fseek(pb, data_size + 10 - 3, SEEK_CUR);
+            avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
             avio_wb32(pb, data_size + 11); // previous tag size
         }
     }
@@ -346,12 +346,12 @@ static int flv_write_trailer(AVFormatContext *s)
     file_size = url_ftell(pb);
 
     /* update informations */
-    url_fseek(pb, flv->duration_offset, SEEK_SET);
+    avio_seek(pb, flv->duration_offset, SEEK_SET);
     put_amf_double(pb, flv->duration / (double)1000);
-    url_fseek(pb, flv->filesize_offset, SEEK_SET);
+    avio_seek(pb, flv->filesize_offset, SEEK_SET);
     put_amf_double(pb, file_size);
 
-    url_fseek(pb, file_size, SEEK_SET);
+    avio_seek(pb, file_size, SEEK_SET);
     return 0;
 }
 
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index 5b8b33c..1873fd3 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -174,7 +174,7 @@ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info
             else if (tag == MAT_LAST_FIELD)
                 si->last_field = value;
         } else
-            url_fskip(pb, tlen);
+            avio_skip(pb, tlen);
     }
 }
 
@@ -223,7 +223,7 @@ static void gxf_track_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si
             else if (tag == TRACK_FPF && (value == 1 || value == 2))
                 si->fields_per_frame = value;
         } else
-            url_fskip(pb, tlen);
+            avio_skip(pb, tlen);
     }
 }
 
@@ -238,7 +238,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) {
     int i;
     pkt_len -= 8;
     if (s->flags & AVFMT_FLAG_IGNIDX) {
-        url_fskip(pb, pkt_len);
+        avio_skip(pb, pkt_len);
         return;
     }
     if (map_cnt > 1000) {
@@ -247,7 +247,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) {
     }
     if (pkt_len < 4 * map_cnt) {
         av_log(s, AV_LOG_ERROR, "invalid index length\n");
-        url_fskip(pb, pkt_len);
+        avio_skip(pb, pkt_len);
         return;
     }
     pkt_len -= 4 * map_cnt;
@@ -255,7 +255,7 @@ static void gxf_read_index(AVFormatContext *s, int pkt_len) {
     for (i = 0; i < map_cnt; i++)
         av_add_index_entry(st, (uint64_t)avio_rl32(pb) * 1024,
                            i * (uint64_t)fields_per_map + 1, 0, 0, 0);
-    url_fskip(pb, pkt_len);
+    avio_skip(pb, pkt_len);
 }
 
 static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
@@ -283,7 +283,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
     }
     map_len -= len;
     gxf_material_tags(pb, &len, &si);
-    url_fskip(pb, len);
+    avio_skip(pb, len);
     map_len -= 2;
     len = avio_rb16(pb); // length of track description
     if (len > map_len) {
@@ -301,7 +301,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
         track_len = avio_rb16(pb);
         len -= track_len;
         gxf_track_tags(pb, &track_len, &si);
-        url_fskip(pb, track_len);
+        avio_skip(pb, track_len);
         if (!(track_type & 0x80)) {
            av_log(s, AV_LOG_ERROR, "invalid track type %x\n", track_type);
            continue;
@@ -326,7 +326,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
     if (len < 0)
         av_log(s, AV_LOG_ERROR, "invalid track description length specified\n");
     if (map_len)
-        url_fskip(pb, map_len);
+        avio_skip(pb, map_len);
     if (!parse_packet_header(pb, &pkt_type, &len)) {
         av_log(s, AV_LOG_ERROR, "sync lost in header\n");
         return -1;
@@ -342,8 +342,8 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
         if (len >= 0x39) {
             AVRational fps;
             len -= 0x39;
-            url_fskip(pb, 5); // preamble
-            url_fskip(pb, 0x30); // payload description
+            avio_skip(pb, 5); // preamble
+            avio_skip(pb, 0x30); // payload description
             fps = fps_umf2avr(avio_rl32(pb));
             if (!main_timebase.num || !main_timebase.den) {
                 // 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) {
             av_log(s, AV_LOG_INFO, "UMF packet too short\n");
     } else
         av_log(s, AV_LOG_INFO, "UMF packet missing\n");
-    url_fskip(pb, len);
+    avio_skip(pb, len);
     // set a fallback value, 60000/1001 is specified for audio-only files
     // so use that regardless of why we do not know the video frame rate.
     if (!main_timebase.num || !main_timebase.den)
@@ -397,10 +397,10 @@ start:
     if (tmp != 1)
         goto start;
     last_pos = url_ftell(pb);
-    if (url_fseek(pb, -5, SEEK_CUR) < 0)
+    if (avio_seek(pb, -5, SEEK_CUR) < 0)
         goto out;
     if (!parse_packet_header(pb, &type, &len) || type != PKT_MEDIA) {
-        if (url_fseek(pb, last_pos, SEEK_SET) < 0)
+        if (avio_seek(pb, last_pos, SEEK_SET) < 0)
             goto out;
         goto start;
     }
@@ -409,12 +409,12 @@ start:
     cur_timestamp = avio_rb32(pb);
     last_found_pos = url_ftell(pb) - 16 - 6;
     if ((track >= 0 && track != cur_track) || (timestamp >= 0 && timestamp > cur_timestamp)) {
-        if (url_fseek(pb, last_pos, SEEK_SET) >= 0)
+        if (avio_seek(pb, last_pos, SEEK_SET) >= 0)
             goto start;
     }
 out:
     if (last_found_pos)
-        url_fseek(pb, last_found_pos, SEEK_SET);
+        avio_seek(pb, last_found_pos, SEEK_SET);
     return cur_timestamp;
 }
 
@@ -437,7 +437,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
             continue;
         }
         if (pkt_type != PKT_MEDIA) {
-            url_fskip(pb, pkt_len);
+            avio_skip(pb, pkt_len);
             continue;
         }
         if (pkt_len < 16) {
@@ -462,7 +462,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
             int last  = field_info & 0xffff; // last is exclusive
             int bps = av_get_bits_per_sample(st->codec->codec_id)>>3;
             if (first <= last && last*bps <= pkt_len) {
-                url_fskip(pb, first*bps);
+                avio_skip(pb, first*bps);
                 skip = pkt_len - last*bps;
                 pkt_len = (last-first)*bps;
             } else
@@ -470,7 +470,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
         }
         ret = av_get_packet(pb, pkt, pkt_len);
         if (skip)
-            url_fskip(pb, skip);
+            avio_skip(pb, skip);
         pkt->stream_index = stream_index;
         pkt->dts = field_nr;
         return ret;
@@ -495,7 +495,7 @@ static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int
     if (idx < st->nb_index_entries - 2)
         maxlen = st->index_entries[idx + 2].pos - pos;
     maxlen = FFMAX(maxlen, 200 * 1024);
-    res = url_fseek(s->pb, pos, SEEK_SET);
+    res = avio_seek(s->pb, pos, SEEK_SET);
     if (res < 0)
         return res;
     found = gxf_resync_media(s, maxlen, -1, timestamp);
@@ -508,7 +508,7 @@ static int64_t gxf_read_timestamp(AVFormatContext *s, int stream_index,
                                   int64_t *pos, int64_t pos_limit) {
     AVIOContext *pb = s->pb;
     int64_t res;
-    if (url_fseek(pb, *pos, SEEK_SET) < 0)
+    if (avio_seek(pb, *pos, SEEK_SET) < 0)
         return AV_NOPTS_VALUE;
     res = gxf_resync_media(s, pos_limit - *pos, -1, -1);
     *pos = url_ftell(pb);
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 1b12f41..66accb3 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -131,9 +131,9 @@ static int64_t updatePacketSize(AVIOContext *pb, int64_t pos)
         size = url_ftell(pb) - pos;
     }
     curpos = url_ftell(pb);
-    url_fseek(pb, pos + 6, SEEK_SET);
+    avio_seek(pb, pos + 6, SEEK_SET);
     avio_wb32(pb, size);
-    url_fseek(pb, curpos, SEEK_SET);
+    avio_seek(pb, curpos, SEEK_SET);
     return curpos - pos;
 }
 
@@ -142,9 +142,9 @@ static int64_t updateSize(AVIOContext *pb, int64_t pos)
     int64_t curpos;
 
     curpos = url_ftell(pb);
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
     avio_wb16(pb, curpos - pos - 2);
-    url_fseek(pb, curpos, SEEK_SET);
+    avio_seek(pb, curpos, SEEK_SET);
     return curpos - pos;
 }
 
@@ -581,9 +581,9 @@ static int gxf_write_umf_media_description(AVFormatContext *s)
         }
 
         curpos = url_ftell(pb);
-        url_fseek(pb, startpos, SEEK_SET);
+        avio_seek(pb, startpos, SEEK_SET);
         avio_wl16(pb, curpos - startpos);
-        url_fseek(pb, curpos, SEEK_SET);
+        avio_seek(pb, curpos, SEEK_SET);
     }
     return url_ftell(pb) - pos;
 }
@@ -776,7 +776,7 @@ static int gxf_write_trailer(AVFormatContext *s)
 
     gxf_write_eos_packet(pb);
     end = url_ftell(pb);
-    url_fseek(pb, 0, SEEK_SET);
+    avio_seek(pb, 0, SEEK_SET);
     /* overwrite map, flt and umf packets with new values */
     gxf_write_map_packet(s, 1);
     gxf_write_flt_packet(s);
@@ -784,12 +784,12 @@ static int gxf_write_trailer(AVFormatContext *s)
     put_flush_packet(pb);
     /* update duration in all map packets */
     for (i = 1; i < gxf->map_offsets_nb; i++) {
-        url_fseek(pb, gxf->map_offsets[i], SEEK_SET);
+        avio_seek(pb, gxf->map_offsets[i], SEEK_SET);
         gxf_write_map_packet(s, 1);
         put_flush_packet(pb);
     }
 
-    url_fseek(pb, end, SEEK_SET);
+    avio_seek(pb, end, SEEK_SET);
 
     av_freep(&gxf->flt_entries);
     av_freep(&gxf->map_offsets);
diff --git a/libavformat/id3v1.c b/libavformat/id3v1.c
index 35199d8..e17e785 100644
--- a/libavformat/id3v1.c
+++ b/libavformat/id3v1.c
@@ -232,12 +232,12 @@ void ff_id3v1_read(AVFormatContext *s)
         /* XXX: change that */
         filesize = url_fsize(s->pb);
         if (filesize > 128) {
-            url_fseek(s->pb, filesize - 128, SEEK_SET);
+            avio_seek(s->pb, filesize - 128, SEEK_SET);
             ret = avio_read(s->pb, buf, ID3v1_TAG_SIZE);
             if (ret == ID3v1_TAG_SIZE) {
                 parse_tag(s, buf);
             }
-            url_fseek(s->pb, 0, SEEK_SET);
+            avio_seek(s->pb, 0, SEEK_SET);
         }
     }
 }
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index a3e5140..f75a2ef 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -171,7 +171,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
     unsync = flags & 0x80;
 
     if (isv34 && flags & 0x40) /* Extended header present, just skip over it */
-        url_fskip(s->pb, get_size(s->pb, 4));
+        avio_skip(s->pb, get_size(s->pb, 4));
 
     while (len >= taghdrlen) {
         unsigned int tflags;
@@ -205,7 +205,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
 
         if (tflags & (ID3v2_FLAG_ENCRYPTION | ID3v2_FLAG_COMPRESSION)) {
             av_log(s, AV_LOG_WARNING, "Skipping encrypted/compressed ID3v2 frame %s.\n", tag);
-            url_fskip(s->pb, tlen);
+            avio_skip(s->pb, tlen);
         } else if (tag[0] == 'T') {
             if (unsync || tunsync) {
                 int i, j;
@@ -226,26 +226,26 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
         else if (!tag[0]) {
             if (tag[1])
                 av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding");
-            url_fskip(s->pb, tlen);
+            avio_skip(s->pb, tlen);
             break;
         }
         /* Skip to end of tag */
-        url_fseek(s->pb, next, SEEK_SET);
+        avio_seek(s->pb, next, SEEK_SET);
     }
 
     if (len > 0) {
         /* Skip padding */
-        url_fskip(s->pb, len);
+        avio_skip(s->pb, len);
     }
     if (version == 4 && flags & 0x10) /* Footer preset, always 10 bytes, skip over it */
-        url_fskip(s->pb, 10);
+        avio_skip(s->pb, 10);
 
     av_free(buffer);
     return;
 
   error:
     av_log(s, AV_LOG_INFO, "ID3v2.%d tag skipped, cannot handle %s\n", version, reason);
-    url_fskip(s->pb, len);
+    avio_skip(s->pb, len);
     av_free(buffer);
 }
 
@@ -271,7 +271,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic)
                    (buf[9] & 0x7f);
             ff_id3v2_parse(s, len, buf[3], buf[5]);
         } else {
-            url_fseek(s->pb, off, SEEK_SET);
+            avio_seek(s->pb, off, SEEK_SET);
         }
     } while (found_header);
     ff_metadata_conv(&s->metadata, NULL, ff_id3v2_34_metadata_conv);
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 7421901..1aecf86 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -257,7 +257,7 @@ static int idcin_read_packet(AVFormatContext *s,
 
         chunk_size = avio_rl32(pb);
         /* skip the number of decoded bytes (always equal to width * height) */
-        url_fseek(pb, 4, SEEK_CUR);
+        avio_seek(pb, 4, SEEK_CUR);
         chunk_size -= 4;
         ret= av_get_packet(pb, pkt, chunk_size);
         if (ret < 0)
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index 5b18397..71324d8 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -136,14 +136,14 @@ static int roq_read_packet(AVFormatContext *s,
                 break;
             }
             /* don't care about this chunk anymore */
-            url_fseek(pb, RoQ_CHUNK_PREAMBLE_SIZE, SEEK_CUR);
+            avio_seek(pb, RoQ_CHUNK_PREAMBLE_SIZE, SEEK_CUR);
             break;
 
         case RoQ_QUAD_CODEBOOK:
             /* packet needs to contain both this codebook and next VQ chunk */
             codebook_offset = url_ftell(pb) - RoQ_CHUNK_PREAMBLE_SIZE;
             codebook_size = chunk_size;
-            url_fseek(pb, codebook_size, SEEK_CUR);
+            avio_seek(pb, codebook_size, SEEK_CUR);
             if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
                 RoQ_CHUNK_PREAMBLE_SIZE)
                 return AVERROR(EIO);
@@ -151,7 +151,7 @@ static int roq_read_packet(AVFormatContext *s,
                 codebook_size;
 
             /* rewind */
-            url_fseek(pb, codebook_offset, SEEK_SET);
+            avio_seek(pb, codebook_offset, SEEK_SET);
 
             /* load up the packet */
             ret= av_get_packet(pb, pkt, chunk_size);
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 15327c2..c585a4c 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -134,7 +134,7 @@ static int iff_read_header(AVFormatContext *s,
         return AVERROR(ENOMEM);
 
     st->codec->channels = 1;
-    url_fskip(pb, 8);
+    avio_skip(pb, 8);
     // codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content
     st->codec->codec_tag = avio_rl32(pb);
 
@@ -152,10 +152,10 @@ static int iff_read_header(AVFormatContext *s,
 
             if (data_size < 14)
                 return AVERROR_INVALIDDATA;
-            url_fskip(pb, 12);
+            avio_skip(pb, 12);
             st->codec->sample_rate = avio_rb16(pb);
             if (data_size >= 16) {
-                url_fskip(pb, 1);
+                avio_skip(pb, 1);
                 compression        = avio_r8(pb);
             }
             break;
@@ -186,14 +186,14 @@ static int iff_read_header(AVFormatContext *s,
                 return AVERROR_INVALIDDATA;
             st->codec->width                 = avio_rb16(pb);
             st->codec->height                = avio_rb16(pb);
-            url_fskip(pb, 4); // x, y offset
+            avio_skip(pb, 4); // x, y offset
             st->codec->bits_per_coded_sample = avio_r8(pb);
             if (data_size >= 11) {
-                url_fskip(pb, 1); // masking
+                avio_skip(pb, 1); // masking
                 compression                  = avio_r8(pb);
             }
             if (data_size >= 16) {
-                url_fskip(pb, 3); // paddding, transparent
+                avio_skip(pb, 3); // paddding, transparent
                 st->sample_aspect_ratio.num  = avio_r8(pb);
                 st->sample_aspect_ratio.den  = avio_r8(pb);
             }
@@ -223,10 +223,10 @@ static int iff_read_header(AVFormatContext *s,
                 return res;
             }
         }
-        url_fskip(pb, data_size - (url_ftell(pb) - orig_pos) + (data_size & 1));
+        avio_skip(pb, data_size - (url_ftell(pb) - orig_pos) + (data_size & 1));
     }
 
-    url_fseek(pb, iff->body_pos, SEEK_SET);
+    avio_seek(pb, iff->body_pos, SEEK_SET);
 
     switch(st->codec->codec_type) {
     case AVMEDIA_TYPE_AUDIO:
diff --git a/libavformat/ingenientdec.c b/libavformat/ingenientdec.c
index dbb3f3b..bfb925e 100644
--- a/libavformat/ingenientdec.c
+++ b/libavformat/ingenientdec.c
@@ -35,11 +35,11 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt)
     w = avio_rl16(s->pb);
     h = avio_rl16(s->pb);
 
-    url_fskip(s->pb, 8); // zero + size (padded?)
-    url_fskip(s->pb, 2);
+    avio_skip(s->pb, 8); // zero + size (padded?)
+    avio_skip(s->pb, 2);
     unk1 = avio_rl16(s->pb);
     unk2 = avio_rl16(s->pb);
-    url_fskip(s->pb, 22); // ASCII timestamp
+    avio_skip(s->pb, 22); // ASCII timestamp
 
     av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n",
         size, w, h, unk1, unk2);
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 6514397..e02e00b 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -133,7 +133,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
             s->audio_chunk_size -= 6;
         }
 
-        url_fseek(pb, s->audio_chunk_offset, SEEK_SET);
+        avio_seek(pb, s->audio_chunk_offset, SEEK_SET);
         s->audio_chunk_offset = 0;
 
         if (s->audio_chunk_size != av_get_packet(pb, pkt, s->audio_chunk_size))
@@ -163,7 +163,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
             return CHUNK_NOMEM;
 
         pkt->pos= s->decode_map_chunk_offset;
-        url_fseek(pb, s->decode_map_chunk_offset, SEEK_SET);
+        avio_seek(pb, s->decode_map_chunk_offset, SEEK_SET);
         s->decode_map_chunk_offset = 0;
 
         if (avio_read(pb, pkt->data, s->decode_map_chunk_size) !=
@@ -172,7 +172,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
             return CHUNK_EOF;
         }
 
-        url_fseek(pb, s->video_chunk_offset, SEEK_SET);
+        avio_seek(pb, s->video_chunk_offset, SEEK_SET);
         s->video_chunk_offset = 0;
 
         if (avio_read(pb, pkt->data + s->decode_map_chunk_size,
@@ -193,7 +193,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
 
     } else {
 
-        url_fseek(pb, s->next_chunk_offset, SEEK_SET);
+        avio_seek(pb, s->next_chunk_offset, SEEK_SET);
         chunk_type = CHUNK_DONE;
 
     }
@@ -299,12 +299,12 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
 
         case OPCODE_END_OF_STREAM:
             debug_ipmovie("end of stream\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_END_OF_CHUNK:
             debug_ipmovie("end of chunk\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_CREATE_TIMER:
@@ -359,7 +359,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
 
         case OPCODE_START_STOP_AUDIO:
             debug_ipmovie("start/stop audio\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_INIT_VIDEO_BUFFERS:
@@ -393,12 +393,12 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
         case OPCODE_UNKNOWN_14:
         case OPCODE_UNKNOWN_15:
             debug_ipmovie("unknown (but documented) opcode %02X\n", opcode_type);
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_SEND_BUFFER:
             debug_ipmovie("send buffer\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_AUDIO_FRAME:
@@ -407,22 +407,22 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
             /* log position and move on for now */
             s->audio_chunk_offset = url_ftell(pb);
             s->audio_chunk_size = opcode_size;
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_SILENCE_FRAME:
             debug_ipmovie("silence frame\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_INIT_VIDEO_MODE:
             debug_ipmovie("initialize video mode\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_CREATE_GRADIENT:
             debug_ipmovie("create gradient\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_SET_PALETTE:
@@ -464,7 +464,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
 
         case OPCODE_SET_PALETTE_COMPRESSED:
             debug_ipmovie("set palette compressed\n");
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_SET_DECODING_MAP:
@@ -473,7 +473,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
             /* log position and move on for now */
             s->decode_map_chunk_offset = url_ftell(pb);
             s->decode_map_chunk_size = opcode_size;
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         case OPCODE_VIDEO_DATA:
@@ -482,7 +482,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
             /* log position and move on for now */
             s->video_chunk_offset = url_ftell(pb);
             s->video_chunk_size = opcode_size;
-            url_fseek(pb, opcode_size, SEEK_CUR);
+            avio_seek(pb, opcode_size, SEEK_CUR);
             break;
 
         default:
@@ -553,7 +553,7 @@ static int ipmovie_read_header(AVFormatContext *s,
         CHUNK_PREAMBLE_SIZE)
         return AVERROR(EIO);
     chunk_type = AV_RL16(&chunk_preamble[2]);
-    url_fseek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);
+    avio_seek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);
 
     if (chunk_type == CHUNK_VIDEO)
         ipmovie->audio_type = CODEC_ID_NONE;  /* no audio */
diff --git a/libavformat/iv8.c b/libavformat/iv8.c
index d463350..df5eb11 100644
--- a/libavformat/iv8.c
+++ b/libavformat/iv8.c
@@ -70,7 +70,7 @@ retry:
         return -1;
 
     if(type==258){
-        url_fskip(s->pb, size);
+        avio_skip(s->pb, size);
         goto retry;
     }
 
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index af94d8c..467ca9c 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -182,7 +182,7 @@ static off_t av_seek(void * h, long long pos, int whence) {
         pos = url_fsize(bc) + pos;
         whence = SEEK_SET;
     }
-    return url_fseek(bc, pos, whence);
+    return avio_seek(bc, pos, whence);
 }
 
 static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index 2991b30..d68e660 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -100,7 +100,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) {
     if ((ret = av_get_packet(pb, pkt, frame_size)) <= 0)
         return AVERROR(EIO);
 
-    url_fskip(pb, padding);
+    avio_skip(pb, padding);
 
     switch (frame_type) {
         case LMLM4_I_FRAME:
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 8692e62..20978c6 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -137,7 +137,7 @@ static int get_packet_header(AVFormatContext *s, uint8_t *header, uint32_t *form
     case 0:
         //video
         //skip VBI data and metadata
-        url_fskip(pb, (int64_t)(uint32_t)AV_RL32(&header[44]) +
+        avio_skip(pb, (int64_t)(uint32_t)AV_RL32(&header[44]) +
                       (int64_t)(uint32_t)AV_RL32(&header[52]));
         break;
     case 1:
@@ -255,7 +255,7 @@ static int lxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     if (format == 1) {
         //skip extended field data
-        url_fskip(s->pb, (uint32_t)AV_RL32(&header[40]));
+        avio_skip(s->pb, (uint32_t)AV_RL32(&header[40]));
     }
 
     return 0;
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4488dd6..0040da7 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -831,7 +831,7 @@ static int ebml_parse_elem(MatroskaDemuxContext *matroska,
                      return ebml_parse_nest(matroska, syntax->def.n, data);
     case EBML_PASS:  return ebml_parse_id(matroska, syntax->def.n, id, data);
     case EBML_STOP:  return 1;
-    default:         return url_fseek(pb,length,SEEK_CUR)<0 ? AVERROR(EIO) : 0;
+    default:         return avio_seek(pb,length,SEEK_CUR)<0 ? AVERROR(EIO) : 0;
     }
     if (res == AVERROR_INVALIDDATA)
         av_log(matroska->ctx, AV_LOG_ERROR, "Invalid element\n");
@@ -1130,7 +1130,7 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska)
             continue;
 
         /* seek */
-        if (url_fseek(matroska->ctx->pb, offset, SEEK_SET) != offset)
+        if (avio_seek(matroska->ctx->pb, offset, SEEK_SET) != offset)
             continue;
 
         /* We don't want to lose our seekhead level, so we add
@@ -1159,7 +1159,7 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska)
     }
 
     /* seek back */
-    url_fseek(matroska->ctx->pb, before_pos, SEEK_SET);
+    avio_seek(matroska->ctx->pb, before_pos, SEEK_SET);
     matroska->level_up = level_up;
     matroska->current_id = saved_id;
 }
@@ -1393,10 +1393,10 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
             int flavor;
             ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size,
                           0, NULL, NULL, NULL, NULL);
-            url_fskip(&b, 22);
+            avio_skip(&b, 22);
             flavor                       = avio_rb16(&b);
             track->audio.coded_framesize = avio_rb32(&b);
-            url_fskip(&b, 12);
+            avio_skip(&b, 12);
             track->audio.sub_packet_h    = avio_rb16(&b);
             track->audio.frame_size      = avio_rb16(&b);
             track->audio.sub_packet_size = avio_rb16(&b);
@@ -1889,7 +1889,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
     timestamp = FFMAX(timestamp, st->index_entries[0].timestamp);
 
     if ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
-        url_fseek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET);
+        avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET);
         while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
             matroska_clear_queue(matroska);
             if (matroska_parse_cluster(matroska) < 0)
@@ -1914,7 +1914,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
         }
     }
 
-    url_fseek(s->pb, st->index_entries[index_min].pos, SEEK_SET);
+    avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET);
     matroska->skip_to_keyframe = !(flags & AVSEEK_FLAG_ANY);
     matroska->skip_to_timecode = st->index_entries[index].timestamp;
     matroska->done = 0;
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 2f07594..6f75220 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -231,10 +231,10 @@ static void end_ebml_master(AVIOContext *pb, ebml_master master)
 {
     int64_t pos = url_ftell(pb);
 
-    if (url_fseek(pb, master.pos - master.sizebytes, SEEK_SET) < 0)
+    if (avio_seek(pb, master.pos - master.sizebytes, SEEK_SET) < 0)
         return;
     put_ebml_num(pb, pos - master.pos, master.sizebytes);
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
 }
 
 static void put_xiph_size(AVIOContext *pb, int size)
@@ -313,7 +313,7 @@ static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead)
     currentpos = url_ftell(pb);
 
     if (seekhead->reserved_size > 0)
-        if (url_fseek(pb, seekhead->filepos, SEEK_SET) < 0)
+        if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)
             return -1;
 
     metaseek = start_ebml_master(pb, MATROSKA_ID_SEEKHEAD, seekhead->reserved_size);
@@ -334,7 +334,7 @@ static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead)
     if (seekhead->reserved_size > 0) {
         uint64_t remaining = seekhead->filepos + seekhead->reserved_size - url_ftell(pb);
         put_ebml_void(pb, remaining);
-        url_fseek(pb, currentpos, SEEK_SET);
+        avio_seek(pb, currentpos, SEEK_SET);
 
         currentpos = seekhead->filepos;
     }
@@ -1163,10 +1163,10 @@ static int mkv_write_trailer(AVFormatContext *s)
         // update the duration
         av_log(s, AV_LOG_DEBUG, "end duration = %" PRIu64 "\n", mkv->duration);
         currentpos = url_ftell(pb);
-        url_fseek(pb, mkv->duration_offset, SEEK_SET);
+        avio_seek(pb, mkv->duration_offset, SEEK_SET);
         put_ebml_float(pb, MATROSKA_ID_DURATION, mkv->duration);
 
-        url_fseek(pb, currentpos, SEEK_SET);
+        avio_seek(pb, currentpos, SEEK_SET);
     }
 
     end_ebml_master(pb, mkv->segment);
diff --git a/libavformat/mm.c b/libavformat/mm.c
index 2c0d215..699daac 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -102,7 +102,7 @@ static int read_header(AVFormatContext *s,
     avio_rl16(pb);   /* ibm-pc video bios mode */
     width = avio_rl16(pb);
     height = avio_rl16(pb);
-    url_fseek(pb, length - 10, SEEK_CUR);  /* unknown data */
+    avio_seek(pb, length - 10, SEEK_CUR);  /* unknown data */
 
     /* video stream */
     st = av_new_stream(s, 0);
@@ -181,7 +181,7 @@ static int read_packet(AVFormatContext *s,
 
         default :
             av_log(s, AV_LOG_INFO, "unknown chunk type 0x%x\n", type);
-            url_fseek(pb, length, SEEK_CUR);
+            avio_seek(pb, length, SEEK_CUR);
         }
     }
 
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index bcb862c..a68870c 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -53,9 +53,9 @@ static void end_tag_be(AVIOContext *pb, int64_t start)
     int64_t pos;
 
     pos = url_ftell(pb);
-    url_fseek(pb, start - 4, SEEK_SET);
+    avio_seek(pb, start - 4, SEEK_SET);
     avio_wb32(pb, (uint32_t)(pos - start));
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
 }
 
 static int mmf_write_header(AVFormatContext *s)
@@ -143,7 +143,7 @@ static int mmf_write_trailer(AVFormatContext *s)
         size = pos - mmf->awapos;
 
         /* Fill Atsq chunk */
-        url_fseek(pb, mmf->atsqpos, SEEK_SET);
+        avio_seek(pb, mmf->atsqpos, SEEK_SET);
 
         /* "play wav" */
         avio_w8(pb, 0); /* start time */
@@ -158,7 +158,7 @@ static int mmf_write_trailer(AVFormatContext *s)
         /* "end of sequence" */
         avio_write(pb, "\x00\x00\x00\x00", 4);
 
-        url_fseek(pb, pos, SEEK_SET);
+        avio_seek(pb, pos, SEEK_SET);
 
         put_flush_packet(pb);
     }
@@ -195,7 +195,7 @@ static int mmf_read_header(AVFormatContext *s,
     file_size = avio_rb32(pb);
 
     /* Skip some unused chunks that may or may not be present */
-    for(;; url_fseek(pb, size, SEEK_CUR)) {
+    for(;; avio_seek(pb, size, SEEK_CUR)) {
         tag = avio_rl32(pb);
         size = avio_rb32(pb);
         if(tag == MKTAG('C','N','T','I')) continue;
@@ -226,7 +226,7 @@ static int mmf_read_header(AVFormatContext *s,
     avio_r8(pb); /* time base g */
 
     /* Skip some unused chunks that may or may not be present */
-    for(;; url_fseek(pb, size, SEEK_CUR)) {
+    for(;; avio_seek(pb, size, SEEK_CUR)) {
         tag = avio_rl32(pb);
         size = avio_rb32(pb);
         if(tag == MKTAG('A','t','s','q')) continue;
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6becc77..0a247af 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -296,7 +296,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             parse = mov_read_udta_string;
 
         if (!parse) { /* skip leaf atoms data */
-            url_fskip(pb, a.size);
+            avio_skip(pb, a.size);
         } else {
             int64_t start_pos = url_ftell(pb);
             int64_t left;
@@ -308,14 +308,14 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                 return 0;
             left = a.size - url_ftell(pb) + start_pos;
             if (left > 0) /* skip garbage at atom end */
-                url_fskip(pb, left);
+                avio_skip(pb, left);
         }
 
         total_size += a.size;
     }
 
     if (total_size < atom.size && atom.size < 0x7ffff)
-        url_fskip(pb, atom.size - total_size);
+        avio_skip(pb, atom.size - total_size);
 
     return 0;
 }
@@ -357,7 +357,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             uint16_t volume_len, len;
             int16_t type;
 
-            url_fskip(pb, 10);
+            avio_skip(pb, 10);
 
             volume_len = avio_r8(pb);
             volume_len = FFMIN(volume_len, 27);
@@ -365,7 +365,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             dref->volume[volume_len] = 0;
             av_log(c->fc, AV_LOG_DEBUG, "volume %s, len %d\n", dref->volume, volume_len);
 
-            url_fskip(pb, 12);
+            avio_skip(pb, 12);
 
             len = avio_r8(pb);
             len = FFMIN(len, 63);
@@ -373,7 +373,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             dref->filename[len] = 0;
             av_log(c->fc, AV_LOG_DEBUG, "filename %s, len %d\n", dref->filename, len);
 
-            url_fskip(pb, 16);
+            avio_skip(pb, 16);
 
             /* read next level up_from_alias/down_to_target */
             dref->nlvl_from = avio_rb16(pb);
@@ -381,7 +381,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             av_log(c->fc, AV_LOG_DEBUG, "nlvl from %d, nlvl to %d\n",
                    dref->nlvl_from, dref->nlvl_to);
 
-            url_fskip(pb, 16);
+            avio_skip(pb, 16);
 
             for (type = 0; type != -1 && url_ftell(pb) < next; ) {
                 type = avio_rb16(pb);
@@ -416,10 +416,10 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                             dref->dir[j] = '/';
                     av_log(c->fc, AV_LOG_DEBUG, "dir %s\n", dref->dir);
                 } else
-                    url_fskip(pb, len);
+                    avio_skip(pb, len);
             }
         }
-        url_fseek(pb, next, SEEK_SET);
+        avio_seek(pb, next, SEEK_SET);
     }
     return 0;
 }
@@ -663,9 +663,9 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
     avio_rb16(pb); /* preferred volume */
 
-    url_fskip(pb, 10); /* reserved */
+    avio_skip(pb, 10); /* reserved */
 
-    url_fskip(pb, 36); /* display matrix */
+    avio_skip(pb, 36); /* display matrix */
 
     avio_rb32(pb); /* preview time */
     avio_rb32(pb); /* preview duration */
@@ -782,7 +782,7 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         if (mov_read_default(c, pb, atom) < 0)
             return -1;
     } else
-        url_fskip(pb, atom.size);
+        avio_skip(pb, atom.size);
     return 0;
 }
 
@@ -833,7 +833,7 @@ static int mov_read_strf(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     if (!st->codec->extradata)
         return AVERROR(ENOMEM);
     st->codec->extradata_size = atom.size - 40;
-    url_fskip(pb, 40);
+    avio_skip(pb, 40);
     avio_read(pb, st->codec->extradata, atom.size - 40);
     return 0;
 }
@@ -945,7 +945,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
              * in the MOV demuxer, patch welcome. */
         multiple_stsd:
             av_log(c->fc, AV_LOG_WARNING, "multiple fourcc not supported\n");
-            url_fskip(pb, size - (url_ftell(pb) - start_pos));
+            avio_skip(pb, size - (url_ftell(pb) - start_pos));
             continue;
         }
         /* 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)
                 len = 31;
             mov_read_mac_string(c, pb, len, st->codec->codec_name, 32);
             if (len < 31)
-                url_fskip(pb, 31 - len);
+                avio_skip(pb, 31 - len);
             /* codec_tag YV12 triggers an UV swap in rawdec.c */
             if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))
                 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)
             st->codec->height = sc->height;
         } else {
             /* other codec type, just skip (rtp, mp4s, tmcd ...) */
-            url_fskip(pb, size - (url_ftell(pb) - start_pos));
+            avio_skip(pb, size - (url_ftell(pb) - start_pos));
         }
         /* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */
         a.size = size - (url_ftell(pb) - start_pos);
@@ -1182,7 +1182,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
             if (mov_read_default(c, pb, a) < 0)
                 return -1;
         } else if (a.size > 0)
-            url_fskip(pb, a.size);
+            avio_skip(pb, a.size);
     }
 
     if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
@@ -1840,7 +1840,7 @@ static int mov_read_meta(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         uint32_t tag = avio_rl32(pb);
         atom.size -= 4;
         if (tag == MKTAG('h','d','l','r')) {
-            url_fseek(pb, -8, SEEK_CUR);
+            avio_seek(pb, -8, SEEK_CUR);
             atom.size += 8;
             return mov_read_default(c, pb, atom);
         }
@@ -2078,13 +2078,13 @@ static int mov_read_wide(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     if (atom.size < 8)
         return 0; /* continue */
     if (avio_rb32(pb) != 0) { /* 0 sized mdat atom... use the 'wide' atom size */
-        url_fskip(pb, atom.size - 4);
+        avio_skip(pb, atom.size - 4);
         return 0;
     }
     atom.type = avio_rl32(pb);
     atom.size -= 8;
     if (atom.type != MKTAG('m','d','a','t')) {
-        url_fskip(pb, atom.size);
+        avio_skip(pb, atom.size);
         return 0;
     }
     err = mov_read_mdat(c, pb, atom);
@@ -2308,7 +2308,7 @@ static void mov_read_chapters(AVFormatContext *s)
         uint16_t ch;
         int len, title_len;
 
-        if (url_fseek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {
+        if (avio_seek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {
             av_log(s, AV_LOG_ERROR, "Chapter %d not found in file\n", i);
             goto finish;
         }
@@ -2338,7 +2338,7 @@ static void mov_read_chapters(AVFormatContext *s)
         av_freep(&title);
     }
 finish:
-    url_fseek(sc->pb, cur_pos, SEEK_SET);
+    avio_seek(sc->pb, cur_pos, SEEK_SET);
 }
 
 static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
@@ -2421,7 +2421,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
     sc->current_sample++;
 
     if (st->discard != AVDISCARD_ALL) {
-        if (url_fseek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {
+        if (avio_seek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {
             av_log(mov->fc, AV_LOG_ERROR, "stream %d, offset 0x%"PRIx64": partial file\n",
                    sc->ffindex, sample->pos);
             return -1;
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index de16b5b..030cbda 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -40,9 +40,9 @@
 static int64_t updateSize(AVIOContext *pb, int64_t pos)
 {
     int64_t curpos = url_ftell(pb);
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
     avio_wb32(pb, curpos - pos); /* rewrite size */
-    url_fseek(pb, curpos, SEEK_SET);
+    avio_seek(pb, curpos, SEEK_SET);
 
     return curpos - pos;
 }
@@ -130,9 +130,9 @@ static int mov_write_stsc_tag(AVIOContext *pb, MOVTrack *track)
         }
     }
     curpos = url_ftell(pb);
-    url_fseek(pb, entryPos, SEEK_SET);
+    avio_seek(pb, entryPos, SEEK_SET);
     avio_wb32(pb, index); // rewrite size
-    url_fseek(pb, curpos, SEEK_SET);
+    avio_seek(pb, curpos, SEEK_SET);
 
     return updateSize(pb, pos);
 }
@@ -155,9 +155,9 @@ static int mov_write_stss_tag(AVIOContext *pb, MOVTrack *track, uint32_t flag)
         }
     }
     curpos = url_ftell(pb);
-    url_fseek(pb, entryPos, SEEK_SET);
+    avio_seek(pb, entryPos, SEEK_SET);
     avio_wb32(pb, index); // rewrite size
-    url_fseek(pb, curpos, SEEK_SET);
+    avio_seek(pb, curpos, SEEK_SET);
     return updateSize(pb, pos);
 }
 
@@ -2235,16 +2235,16 @@ static int mov_write_trailer(AVFormatContext *s)
 
     /* Write size of mdat tag */
     if (mov->mdat_size+8 <= UINT32_MAX) {
-        url_fseek(pb, mov->mdat_pos, SEEK_SET);
+        avio_seek(pb, mov->mdat_pos, SEEK_SET);
         avio_wb32(pb, mov->mdat_size+8);
     } else {
         /* overwrite 'wide' placeholder atom */
-        url_fseek(pb, mov->mdat_pos - 8, SEEK_SET);
+        avio_seek(pb, mov->mdat_pos - 8, SEEK_SET);
         avio_wb32(pb, 1); /* special value: real atom size will be 64 bit value after tag field */
         ffio_wfourcc(pb, "mdat");
         avio_wb64(pb, mov->mdat_size+16);
     }
-    url_fseek(pb, moov_pos, SEEK_SET);
+    avio_seek(pb, moov_pos, SEEK_SET);
 
     mov_write_moov_tag(pb, mov, s);
 
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index fbc7faa..e6f74cd 100644
--- a/libavformat/movenchint.c
+++ b/libavformat/movenchint.c
@@ -372,15 +372,15 @@ static int write_hint_packets(AVIOContext *out, const uint8_t *data,
         size -= packet_len;
 
         curpos = url_ftell(out);
-        url_fseek(out, entries_pos, SEEK_SET);
+        avio_seek(out, entries_pos, SEEK_SET);
         avio_wb16(out, entries);
-        url_fseek(out, curpos, SEEK_SET);
+        avio_seek(out, curpos, SEEK_SET);
     }
 
     curpos = url_ftell(out);
-    url_fseek(out, count_pos, SEEK_SET);
+    avio_seek(out, count_pos, SEEK_SET);
     avio_wb16(out, count);
-    url_fseek(out, curpos, SEEK_SET);
+    avio_seek(out, curpos, SEEK_SET);
     return count;
 }
 
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index a71638e..f90348c 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -90,7 +90,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
         return -1;
 
     /* Check for Xing / Info tag */
-    url_fseek(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1], SEEK_CUR);
+    avio_seek(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1], SEEK_CUR);
     v = avio_rb32(s->pb);
     if(v == MKBETAG('X', 'i', 'n', 'g') || v == MKBETAG('I', 'n', 'f', 'o')) {
         v = avio_rb32(s->pb);
@@ -101,13 +101,13 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
     }
 
     /* Check for VBRI tag (always 32 bytes after end of mpegaudio header) */
-    url_fseek(s->pb, base + 4 + 32, SEEK_SET);
+    avio_seek(s->pb, base + 4 + 32, SEEK_SET);
     v = avio_rb32(s->pb);
     if(v == MKBETAG('V', 'B', 'R', 'I')) {
         /* Check tag version */
         if(avio_rb16(s->pb) == 1) {
             /* skip delay and quality */
-            url_fseek(s->pb, 4, SEEK_CUR);
+            avio_seek(s->pb, 4, SEEK_CUR);
             frames = avio_rb32(s->pb);
             size = avio_rb32(s->pb);
         }
@@ -117,7 +117,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
         return -1;
 
     /* Skip the vbr tag frame */
-    url_fseek(s->pb, base + vbrtag_size, SEEK_SET);
+    avio_seek(s->pb, base + vbrtag_size, SEEK_SET);
 
     spf = c.lsf ? 576 : 1152; /* Samples per frame, layer 3 */
     if(frames)
@@ -153,7 +153,7 @@ static int mp3_read_header(AVFormatContext *s,
         ff_id3v1_read(s);
 
     if (mp3_parse_vbr_tags(s, st, off) < 0)
-        url_fseek(s->pb, off, SEEK_SET);
+        avio_seek(s->pb, off, SEEK_SET);
 
     /* the parameters will be extracted from the compressed bitstream */
     return 0;
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 0635228..c465420 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -238,9 +238,9 @@ static int mp3_write_header(struct AVFormatContext *s)
     }
 
     cur_pos = url_ftell(s->pb);
-    url_fseek(s->pb, size_pos, SEEK_SET);
+    avio_seek(s->pb, size_pos, SEEK_SET);
     id3v2_put_size(s, totlen);
-    url_fseek(s->pb, cur_pos, SEEK_SET);
+    avio_seek(s->pb, cur_pos, SEEK_SET);
 
     return 0;
 }
diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index 73217a3..c229383 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -98,7 +98,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap)
         ff_ape_parse_tag(s);
         if (!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
             ff_id3v1_read(s);
-        url_fseek(s->pb, pos, SEEK_SET);
+        avio_seek(s->pb, pos, SEEK_SET);
     }
 
     return 0;
@@ -114,7 +114,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
         return -1;
 
     if(c->curframe != c->lastframe + 1){
-        url_fseek(s->pb, c->frames[c->curframe].pos, SEEK_SET);
+        avio_seek(s->pb, c->frames[c->curframe].pos, SEEK_SET);
         c->curbits = c->frames[c->curframe].skip;
     }
     c->lastframe = c->curframe;
@@ -129,7 +129,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
         size2 = (tmp >> (44 - curbits)) & 0xFFFFF;
     }
     curbits += 20;
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
 
     size = ((size2 + curbits + 31) & ~31) >> 3;
     if(cur == c->frames_noted){
@@ -153,7 +153,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
     pkt->pts = cur;
     ret = avio_read(s->pb, pkt->data + 4, size);
     if(c->curbits)
-        url_fseek(s->pb, -4, SEEK_CUR);
+        avio_seek(s->pb, -4, SEEK_CUR);
     if(ret < size){
         av_free_packet(pkt);
         return AVERROR(EIO);
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 22439f9..e0e973e 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -135,7 +135,7 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
     int i, t, seekd;
     GetBitContext gb;
 
-    url_fseek(s->pb, off, SEEK_SET);
+    avio_seek(s->pb, off, SEEK_SET);
     mpc8_get_chunk_header(s->pb, &tag, &size);
     if(tag != TAG_SEEKTABLE){
         av_log(s, AV_LOG_ERROR, "No seek table at given position\n");
@@ -179,10 +179,10 @@ static void mpc8_handle_chunk(AVFormatContext *s, int tag, int64_t chunk_pos, in
         pos = url_ftell(pb) + size;
         off = ff_get_v(pb);
         mpc8_parse_seektable(s, chunk_pos + off);
-        url_fseek(pb, pos, SEEK_SET);
+        avio_seek(pb, pos, SEEK_SET);
         break;
     default:
-        url_fskip(pb, size);
+        avio_skip(pb, size);
     }
 }
 
@@ -212,7 +212,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return -1;
     }
     pos = url_ftell(pb);
-    url_fskip(pb, 4); //CRC
+    avio_skip(pb, 4); //CRC
     c->ver = avio_r8(pb);
     if(c->ver != 8){
         av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
@@ -273,7 +273,7 @@ static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestam
     int index = av_index_search_timestamp(st, timestamp, flags);
 
     if(index < 0) return -1;
-    url_fseek(s->pb, st->index_entries[index].pos, SEEK_SET);
+    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
     c->frame = st->index_entries[index].timestamp;
     return 0;
 }
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index c5b6bfc..c66f825 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -175,7 +175,7 @@ static int find_prev_start_code(AVIOContext *pb, int *size_ptr)
     pos = pos_start - 16386;
     if (pos < 0)
         pos = 0;
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
     avio_r8(pb);
 
     pos = pos_start;
@@ -185,7 +185,7 @@ static int find_prev_start_code(AVIOContext *pb, int *size_ptr)
             start_code = -1;
             goto the_end;
         }
-        url_fseek(pb, pos, SEEK_SET);
+        avio_seek(pb, pos, SEEK_SET);
         start_code = avio_rb32(pb);
         if ((start_code & 0xffffff00) == 0x100)
             break;
@@ -212,7 +212,7 @@ static long mpegps_psm_parse(MpegDemuxContext *m, AVIOContext *pb)
     ps_info_length = avio_rb16(pb);
 
     /* skip program_stream_info */
-    url_fskip(pb, ps_info_length);
+    avio_skip(pb, ps_info_length);
     es_map_length = avio_rb16(pb);
 
     /* at least one es available? */
@@ -223,7 +223,7 @@ static long mpegps_psm_parse(MpegDemuxContext *m, AVIOContext *pb)
         /* remember mapping from stream id to stream type */
         m->psm_es_type[es_id] = type;
         /* skip program_stream_info */
-        url_fskip(pb, es_info_length);
+        avio_skip(pb, es_info_length);
         es_map_length -= 4 + es_info_length;
     }
     avio_rb32(pb); /* crc32 */
@@ -244,7 +244,7 @@ static int mpegps_read_pes_header(AVFormatContext *s,
     int64_t last_sync= url_ftell(s->pb);
 
  error_redo:
-        url_fseek(s->pb, last_sync, SEEK_SET);
+        avio_seek(s->pb, last_sync, SEEK_SET);
  redo:
         /* next start code (should be immediately after) */
         m->header_state = 0xff;
@@ -264,7 +264,7 @@ static int mpegps_read_pes_header(AVFormatContext *s,
     if (startcode == SYSTEM_HEADER_START_CODE)
         goto redo;
     if (startcode == PADDING_STREAM) {
-        url_fskip(s->pb, avio_rb16(s->pb));
+        avio_skip(s->pb, avio_rb16(s->pb));
         goto redo;
     }
     if (startcode == PRIVATE_STREAM_2) {
@@ -281,7 +281,7 @@ static int mpegps_read_pes_header(AVFormatContext *s,
             }
             m->sofdec -= !m->sofdec;
         }
-        url_fskip(s->pb, len);
+        avio_skip(s->pb, len);
         goto redo;
     }
     if (startcode == PROGRAM_STREAM_MAP) {
@@ -359,7 +359,7 @@ static int mpegps_read_pes_header(AVFormatContext *s,
                 av_log(s, AV_LOG_WARNING, "pes_ext %X is invalid\n", pes_ext);
                 pes_ext=skip=0;
             }
-            url_fskip(s->pb, skip);
+            avio_skip(s->pb, skip);
             header_len -= skip;
 
             if (pes_ext & 0x01) { /* PES extension 2 */
@@ -375,7 +375,7 @@ static int mpegps_read_pes_header(AVFormatContext *s,
         }
         if(header_len < 0)
             goto error_redo;
-        url_fskip(s->pb, header_len);
+        avio_skip(s->pb, header_len);
     }
     else if( c!= 0xf )
         goto redo;
@@ -433,7 +433,7 @@ static int mpegps_read_packet(AVFormatContext *s,
 
     if(startcode == 0x1bd) {
         dvdaudio_substream_type = avio_r8(s->pb);
-        url_fskip(s->pb, 3);
+        avio_skip(s->pb, 3);
         len -= 4;
     }
 
@@ -475,7 +475,7 @@ static int mpegps_read_packet(AVFormatContext *s,
         static const unsigned char avs_seqh[4] = { 0, 0, 1, 0xb0 };
         unsigned char buf[8];
         avio_read(s->pb, buf, 8);
-        url_fseek(s->pb, -8, SEEK_CUR);
+        avio_seek(s->pb, -8, SEEK_CUR);
         if(!memcmp(buf, avs_seqh, 4) && (buf[6] != 0 || buf[7] != 1))
             codec_id = CODEC_ID_CAVS;
         else
@@ -525,7 +525,7 @@ static int mpegps_read_packet(AVFormatContext *s,
     } else {
     skip:
         /* skip packet */
-        url_fskip(s->pb, len);
+        avio_skip(s->pb, len);
         goto redo;
     }
     /* no stream found: add a new stream */
@@ -587,7 +587,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
 #ifdef DEBUG_SEEK
     printf("read_dts: pos=0x%"PRIx64" next=%d -> ", pos, find_next);
 #endif
-    if (url_fseek(s->pb, pos, SEEK_SET) < 0)
+    if (avio_seek(s->pb, pos, SEEK_SET) < 0)
         return AV_NOPTS_VALUE;
 
     for(;;) {
@@ -602,7 +602,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
             dts != AV_NOPTS_VALUE) {
             break;
         }
-        url_fskip(s->pb, len);
+        avio_skip(s->pb, len);
     }
 #ifdef DEBUG_SEEK
     printf("pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n", pos, dts, dts / 90000.0);
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 3307685..7b801fe 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1316,7 +1316,7 @@ static int mpegts_resync(AVFormatContext *s)
         if (c < 0)
             return -1;
         if (c == 0x47) {
-            url_fseek(pb, -1, SEEK_CUR);
+            avio_seek(pb, -1, SEEK_CUR);
             return 0;
         }
     }
@@ -1338,7 +1338,7 @@ static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size)
         /* check paquet sync byte */
         if (buf[0] != 0x47) {
             /* find a new packet start */
-            url_fseek(pb, -TS_PACKET_SIZE, SEEK_CUR);
+            avio_seek(pb, -TS_PACKET_SIZE, SEEK_CUR);
             if (mpegts_resync(s) < 0)
                 return AVERROR(EAGAIN);
             else
@@ -1346,7 +1346,7 @@ static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size)
         } else {
             skip = raw_packet_size - TS_PACKET_SIZE;
             if (skip > 0)
-                url_fskip(pb, skip);
+                avio_skip(pb, skip);
             break;
         }
     }
@@ -1468,7 +1468,7 @@ static int mpegts_read_header(AVFormatContext *s,
         /* normal demux */
 
         /* first do a scaning to get all the services */
-        if (url_fseek(pb, pos, SEEK_SET) < 0)
+        if (avio_seek(pb, pos, SEEK_SET) < 0)
             av_log(s, AV_LOG_ERROR, "Unable to seek back to the start\n");
 
         mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1);
@@ -1533,7 +1533,7 @@ static int mpegts_read_header(AVFormatContext *s,
 #endif
     }
 
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
     return 0;
  fail:
     return -1;
@@ -1564,7 +1564,7 @@ static int mpegts_raw_read_packet(AVFormatContext *s,
             /* we read the next PCR (XXX: optimize it by using a bigger buffer */
             pos = url_ftell(s->pb);
             for(i = 0; i < MAX_PACKET_READAHEAD; i++) {
-                url_fseek(s->pb, pos + i * ts->raw_packet_size, SEEK_SET);
+                avio_seek(s->pb, pos + i * ts->raw_packet_size, SEEK_SET);
                 avio_read(s->pb, pcr_buf, 12);
                 if (parse_pcr(&next_pcr_h, &next_pcr_l, pcr_buf) == 0) {
                     /* XXX: not precise enough */
@@ -1573,7 +1573,7 @@ static int mpegts_raw_read_packet(AVFormatContext *s,
                     break;
                 }
             }
-            url_fseek(s->pb, pos, SEEK_SET);
+            avio_seek(s->pb, pos, SEEK_SET);
             /* no next PCR found: we use previous increment */
             ts->cur_pcr = pcr_h * 300 + pcr_l;
         }
@@ -1649,7 +1649,7 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
     pos = ((*ppos  + ts->raw_packet_size - 1 - ts->pos47) / ts->raw_packet_size) * ts->raw_packet_size + ts->pos47;
     if (find_next) {
         for(;;) {
-            url_fseek(s->pb, pos, SEEK_SET);
+            avio_seek(s->pb, pos, SEEK_SET);
             if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
                 return AV_NOPTS_VALUE;
             if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) &&
@@ -1663,7 +1663,7 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
             pos -= ts->raw_packet_size;
             if (pos < 0)
                 return AV_NOPTS_VALUE;
-            url_fseek(s->pb, pos, SEEK_SET);
+            avio_seek(s->pb, pos, SEEK_SET);
             if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
                 return AV_NOPTS_VALUE;
             if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) &&
@@ -1774,14 +1774,14 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t target_ts, in
     pos= url_ftell(s->pb);
 
     for(;;) {
-        url_fseek(s->pb, pos, SEEK_SET);
+        avio_seek(s->pb, pos, SEEK_SET);
         if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
             return -1;
 //        pid = AV_RB16(buf + 1) & 0x1fff;
         if(buf[1] & 0x40) break;
         pos += ts->raw_packet_size;
     }
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
 
     return 0;
 }
diff --git a/libavformat/msnwc_tcp.c b/libavformat/msnwc_tcp.c
index 3033c23..6cbfda4 100644
--- a/libavformat/msnwc_tcp.c
+++ b/libavformat/msnwc_tcp.c
@@ -104,19 +104,19 @@ static int msnwc_tcp_read_packet(AVFormatContext *ctx, AVPacket *pkt)
     uint16_t keyframe;
     uint32_t size, timestamp;
 
-    url_fskip(pb, 1); /* one byte has been read ahead */
-    url_fskip(pb, 2);
-    url_fskip(pb, 2);
+    avio_skip(pb, 1); /* one byte has been read ahead */
+    avio_skip(pb, 2);
+    avio_skip(pb, 2);
     keyframe = avio_rl16(pb);
     size = avio_rl32(pb);
-    url_fskip(pb, 4);
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
+    avio_skip(pb, 4);
     timestamp = avio_rl32(pb);
 
     if(!size || av_get_packet(pb, pkt, size) != size)
         return -1;
 
-    url_fskip(pb, 1); /* Read ahead one byte of struct size like read_header */
+    avio_skip(pb, 1); /* Read ahead one byte of struct size like read_header */
 
     pkt->pts = timestamp;
     pkt->dts = timestamp;
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 94d8aff..65fd9c7 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -83,10 +83,10 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
     AVStream        *st;
     unsigned int    audio_subsegments;
 
-    url_fskip(pb, 3);
+    avio_skip(pb, 3);
     mtv->file_size         = avio_rl32(pb);
     mtv->segments          = avio_rl32(pb);
-    url_fskip(pb, 32);
+    avio_skip(pb, 32);
     mtv->audio_identifier  = avio_rl24(pb);
     mtv->audio_br          = avio_rl16(pb);
     mtv->img_colorfmt      = avio_rl24(pb);
@@ -105,7 +105,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
         mtv->img_height=mtv->img_segment_size / (mtv->img_bpp>>3)
                         / mtv->img_width;
 
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
     audio_subsegments = avio_rl16(pb);
     mtv->full_segment_size =
         audio_subsegments * (MTV_AUDIO_PADDING_SIZE + MTV_ASUBCHUNK_DATA_SIZE) +
@@ -146,7 +146,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     // Jump over header
 
-    if(url_fseek(pb, MTV_HEADER_SIZE, SEEK_SET) != MTV_HEADER_SIZE)
+    if(avio_seek(pb, MTV_HEADER_SIZE, SEEK_SET) != MTV_HEADER_SIZE)
         return AVERROR(EIO);
 
     return 0;
@@ -164,7 +164,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     if((url_ftell(pb) - s->data_offset + mtv->img_segment_size) % mtv->full_segment_size)
     {
-        url_fskip(pb, MTV_AUDIO_PADDING_SIZE);
+        avio_skip(pb, MTV_AUDIO_PADDING_SIZE);
 
         ret = av_get_packet(pb, pkt, MTV_ASUBCHUNK_DATA_SIZE);
         if(ret < 0)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 9f694e3..e2ff5cc 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -262,7 +262,7 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
         av_aes_init(mxf->aesc, s->key, 128, 1);
     }
     // crypto context
-    url_fskip(pb, klv_decode_ber_length(pb));
+    avio_skip(pb, klv_decode_ber_length(pb));
     // plaintext offset
     klv_decode_ber_length(pb);
     plaintext_size = avio_rb64(pb);
@@ -297,7 +297,7 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
                      &pkt->data[plaintext_size], size >> 4, ivec, 1);
     pkt->size = orig_size;
     pkt->stream_index = index;
-    url_fskip(pb, end - url_ftell(pb));
+    avio_skip(pb, end - url_ftell(pb));
     return 0;
 }
 
@@ -339,7 +339,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
             return 0;
         } else
         skip:
-            url_fskip(s->pb, klv.length);
+            avio_skip(s->pb, klv.length);
     }
     return AVERROR_EOF;
 }
@@ -397,7 +397,7 @@ static int mxf_read_content_storage(void *arg, AVIOContext *pb, int tag, int siz
         mxf->packages_refs = av_malloc(mxf->packages_count * sizeof(UID));
         if (!mxf->packages_refs)
             return -1;
-        url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
+        avio_skip(pb, 4); /* useless size of objects, always 16 according to specs */
         avio_read(pb, (uint8_t *)mxf->packages_refs, mxf->packages_count * sizeof(UID));
         break;
     }
@@ -416,7 +416,7 @@ static int mxf_read_source_clip(void *arg, AVIOContext *pb, int tag, int size, U
         break;
     case 0x1101:
         /* UMID, only get last 16 bytes */
-        url_fskip(pb, 16);
+        avio_skip(pb, 16);
         avio_read(pb, source_clip->source_package_uid, 16);
         break;
     case 0x1102:
@@ -437,7 +437,7 @@ static int mxf_read_material_package(void *arg, AVIOContext *pb, int tag, int si
         package->tracks_refs = av_malloc(package->tracks_count * sizeof(UID));
         if (!package->tracks_refs)
             return -1;
-        url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
+        avio_skip(pb, 4); /* useless size of objects, always 16 according to specs */
         avio_read(pb, (uint8_t *)package->tracks_refs, package->tracks_count * sizeof(UID));
         break;
     }
@@ -482,7 +482,7 @@ static int mxf_read_sequence(void *arg, AVIOContext *pb, int tag, int size, UID
         sequence->structural_components_refs = av_malloc(sequence->structural_components_count * sizeof(UID));
         if (!sequence->structural_components_refs)
             return -1;
-        url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
+        avio_skip(pb, 4); /* useless size of objects, always 16 according to specs */
         avio_read(pb, (uint8_t *)sequence->structural_components_refs, sequence->structural_components_count * sizeof(UID));
         break;
     }
@@ -500,12 +500,12 @@ static int mxf_read_source_package(void *arg, AVIOContext *pb, int tag, int size
         package->tracks_refs = av_malloc(package->tracks_count * sizeof(UID));
         if (!package->tracks_refs)
             return -1;
-        url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
+        avio_skip(pb, 4); /* useless size of objects, always 16 according to specs */
         avio_read(pb, (uint8_t *)package->tracks_refs, package->tracks_count * sizeof(UID));
         break;
     case 0x4401:
         /* UMID, only get last 16 bytes */
-        url_fskip(pb, 16);
+        avio_skip(pb, 16);
         avio_read(pb, package->package_uid, 16);
         break;
     case 0x4701:
@@ -558,7 +558,7 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
         descriptor->sub_descriptors_refs = av_malloc(descriptor->sub_descriptors_count * sizeof(UID));
         if (!descriptor->sub_descriptors_refs)
             return -1;
-        url_fskip(pb, 4); /* useless size of objects, always 16 according to specs */
+        avio_skip(pb, 4); /* useless size of objects, always 16 according to specs */
         avio_read(pb, (uint8_t *)descriptor->sub_descriptors_refs, descriptor->sub_descriptors_count * sizeof(UID));
         break;
     case 0x3004:
@@ -897,7 +897,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
         else if (read_child(ctx, pb, tag, size, uid) < 0)
             return -1;
 
-        url_fseek(pb, next, SEEK_SET);
+        avio_seek(pb, next, SEEK_SET);
     }
     if (ctx_size) ctx->type = type;
     return ctx_size ? mxf_add_metadata_set(mxf, ctx) : 0;
@@ -912,7 +912,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
         av_log(s, AV_LOG_ERROR, "could not find header partition pack key\n");
         return -1;
     }
-    url_fseek(s->pb, -14, SEEK_CUR);
+    avio_seek(s->pb, -14, SEEK_CUR);
     mxf->fc = s;
     while (!url_feof(s->pb)) {
         const MXFMetadataReadTableEntry *metadata;
@@ -924,7 +924,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
         if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
             IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
             /* FIXME avoid seek */
-            url_fseek(s->pb, klv.offset, SEEK_SET);
+            avio_seek(s->pb, klv.offset, SEEK_SET);
             break;
         }
 
@@ -943,7 +943,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
             }
         }
         if (!metadata->read)
-            url_fskip(s->pb, klv.length);
+            avio_skip(s->pb, klv.length);
     }
     return mxf_parse_structural_metadata(mxf);
 }
@@ -1009,7 +1009,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
     if (sample_time < 0)
         sample_time = 0;
     seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den);
-    url_fseek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET);
+    avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET);
     av_update_cur_dts(s, st, sample_time);
     return 0;
 }
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 9e63531..395d7c3 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1267,9 +1267,9 @@ static void mxf_write_partition(AVFormatContext *s, int bodysid,
         header_byte_count = pos - start + klv_fill_size(pos);
 
         // update header_byte_count
-        url_fseek(pb, header_byte_count_offset, SEEK_SET);
+        avio_seek(pb, header_byte_count_offset, SEEK_SET);
         avio_wb64(pb, header_byte_count);
-        url_fseek(pb, pos, SEEK_SET);
+        avio_seek(pb, pos, SEEK_SET);
     }
 
     put_flush_packet(pb);
@@ -1785,7 +1785,7 @@ static int mxf_write_footer(AVFormatContext *s)
     mxf_write_random_index_pack(s);
 
     if (!url_is_streamed(s->pb)) {
-        url_fseek(pb, 0, SEEK_SET);
+        avio_seek(pb, 0, SEEK_SET);
         if (mxf->edit_unit_byte_count) {
             mxf_write_partition(s, 1, 2, header_closed_partition_key, 1);
             mxf_write_klv_fill(s);
diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c
index 9f62f22..c95b4bd 100644
--- a/libavformat/ncdec.c
+++ b/libavformat/ncdec.c
@@ -73,7 +73,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     avio_r8(s->pb);
     size = avio_rl16(s->pb);
-    url_fskip(s->pb, 9);
+    avio_skip(s->pb, 9);
 
     if (size == 0) {
         av_log(s, AV_LOG_DEBUG, "Next packet size is zero\n");
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 6ac8866..d0fbe0a 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -364,7 +364,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
     av_dlog(s, "NSV [dataoffset][fileoffset]\n", table_entries);
     for (i = 0; i < table_entries; i++) {
         unsigned char b[8];
-        url_fseek(pb, size + nsv->nsvs_file_offset[i], SEEK_SET);
+        avio_seek(pb, size + nsv->nsvs_file_offset[i], SEEK_SET);
         avio_read(pb, b, 8);
         av_dlog(s, "NSV [0x%08lx][0x%08lx]: %02x %02x %02x %02x %02x %02x %02x %02x"
            "%c%c%c%c%c%c%c%c\n",
@@ -372,11 +372,11 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
            b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],
            V(b[0]), V(b[1]), V(b[2]), V(b[3]), V(b[4]), V(b[5]), V(b[6]), V(b[7]) );
     }
-    //url_fseek(pb, size, SEEK_SET); /* go back to end of header */
+    //avio_seek(pb, size, SEEK_SET); /* go back to end of header */
 #undef V
 #endif
 
-    url_fseek(pb, nsv->base_offset + size, SEEK_SET); /* required for dumbdriving-271.nsv (2 extra bytes) */
+    avio_seek(pb, nsv->base_offset + size, SEEK_SET); /* required for dumbdriving-271.nsv (2 extra bytes) */
 
     if (url_feof(pb))
         return -1;
@@ -584,7 +584,7 @@ null_chunk_retry:
               ((auxtag >> 16) & 0x0ff),
               ((auxtag >> 24) & 0x0ff),
               auxsize);
-        url_fskip(pb, auxsize);
+        avio_skip(pb, auxsize);
         vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming braindead */
     }
 
@@ -700,7 +700,7 @@ static int nsv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
     if(index < 0)
         return -1;
 
-    url_fseek(s->pb, st->index_entries[index].pos, SEEK_SET);
+    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
     nst->frame_offset = st->index_entries[index].timestamp;
     nsv->state = NSV_UNSYNC;
     return 0;
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index a2e6ec1..47997f5 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -119,7 +119,7 @@ static uint64_t find_any_startcode(AVIOContext *bc, int64_t pos){
     uint64_t state=0;
 
     if(pos >= 0)
-        url_fseek(bc, pos, SEEK_SET); //note, this may fail if the stream is not seekable, but that should not matter, as in this case we simply start where we currently are
+        avio_seek(bc, pos, SEEK_SET); //note, this may fail if the stream is not seekable, but that should not matter, as in this case we simply start where we currently are
 
     while(!url_feof(bc)){
         state= (state<<8) | avio_r8(bc);
@@ -178,7 +178,7 @@ static int nut_probe(AVProbeData *p){
 static int skip_reserved(AVIOContext *bc, int64_t pos){
     pos -= url_ftell(bc);
     if(pos<0){
-        url_fseek(bc, pos, SEEK_CUR);
+        avio_seek(bc, pos, SEEK_CUR);
         return -1;
     }else{
         while(pos--)
@@ -513,8 +513,8 @@ static int find_and_decode_index(NUTContext *nut){
     int8_t *has_keyframe;
     int ret= -1;
 
-    url_fseek(bc, filesize-12, SEEK_SET);
-    url_fseek(bc, filesize-avio_rb64(bc), SEEK_SET);
+    avio_seek(bc, filesize-12, SEEK_SET);
+    avio_seek(bc, filesize-avio_rb64(bc), SEEK_SET);
     if(avio_rb64(bc) != INDEX_STARTCODE){
         av_log(s, AV_LOG_ERROR, "no index at the end\n");
         return -1;
@@ -655,7 +655,7 @@ static int nut_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if(!url_is_streamed(bc)){
         int64_t orig_pos= url_ftell(bc);
         find_and_decode_index(nut);
-        url_fseek(bc, orig_pos, SEEK_SET);
+        avio_seek(bc, orig_pos, SEEK_SET);
     }
     assert(nut->next_startcode == SYNCPOINT_STARTCODE);
 
@@ -757,7 +757,7 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code){
        ||(discard >= AVDISCARD_BIDIR && last_IP_pts != AV_NOPTS_VALUE && last_IP_pts > pts)
        || discard >= AVDISCARD_ALL
        || stc->skip_until_key_frame){
-        url_fskip(bc, size);
+        avio_skip(bc, size);
         return 1;
     }
 
@@ -803,7 +803,7 @@ static int nut_read_packet(AVFormatContext *s, AVPacket *pkt)
         case STREAM_STARTCODE:
         case INDEX_STARTCODE:
             skip= get_packetheader(nut, bc, 0, tmp);
-            url_fseek(bc, skip, SEEK_CUR);
+            avio_seek(bc, skip, SEEK_CUR);
             break;
         case INFO_STARTCODE:
             if(decode_info_header(nut)<0)
@@ -900,7 +900,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flag
     }
     av_log(NULL, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2);
     pos= find_startcode(s->pb, SYNCPOINT_STARTCODE, pos2);
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
     av_log(NULL, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos);
     if(pos2 > pos || pos2 + 15 < pos){
         av_log(NULL, AV_LOG_ERROR, "no syncpoint at backptr pos\n");
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index e360a64..e4981d9 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -66,7 +66,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
         switch (frametype) {
             case NUV_EXTRADATA:
                 subtype = avio_r8(pb);
-                url_fskip(pb, 6);
+                avio_skip(pb, 6);
                 size = PKTSIZE(avio_rl32(pb));
                 if (vst && subtype == 'R') {
                     vst->codec->extradata_size = size;
@@ -78,7 +78,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
                 }
                 break;
             case NUV_MYTHEXT:
-                url_fskip(pb, 7);
+                avio_skip(pb, 7);
                 size = PKTSIZE(avio_rl32(pb));
                 if (size != 128 * 4)
                     break;
@@ -90,7 +90,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
                     if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
                         vst->codec->codec_id = CODEC_ID_NUV;
                 } else
-                    url_fskip(pb, 4);
+                    avio_skip(pb, 4);
 
                 if (ast) {
                     ast->codec->codec_tag = avio_rl32(pb);
@@ -102,20 +102,20 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
                                          ast->codec->bits_per_coded_sample);
                     ast->need_parsing = AVSTREAM_PARSE_FULL;
                 } else
-                    url_fskip(pb, 4 * 4);
+                    avio_skip(pb, 4 * 4);
 
                 size -= 6 * 4;
-                url_fskip(pb, size);
+                avio_skip(pb, size);
                 return 1;
             case NUV_SEEKP:
                 size = 11;
                 break;
             default:
-                url_fskip(pb, 7);
+                avio_skip(pb, 7);
                 size = PKTSIZE(avio_rl32(pb));
                 break;
         }
-        url_fskip(pb, size);
+        avio_skip(pb, size);
     }
     return 0;
 }
@@ -130,14 +130,14 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
     AVStream *vst = NULL, *ast = NULL;
     avio_read(pb, id_string, 12);
     is_mythtv = !memcmp(id_string, "MythTVVideo", 12);
-    url_fskip(pb, 5); // version string
-    url_fskip(pb, 3); // padding
+    avio_skip(pb, 5); // version string
+    avio_skip(pb, 3); // padding
     width = avio_rl32(pb);
     height = avio_rl32(pb);
     avio_rl32(pb); // unused, "desiredwidth"
     avio_rl32(pb); // unused, "desiredheight"
     avio_r8(pb); // 'P' == progressive, 'I' == interlaced
-    url_fskip(pb, 3); // padding
+    avio_skip(pb, 3); // padding
     aspect = av_int2dbl(avio_rl64(pb));
     if (aspect > 0.9999 && aspect < 1.0001)
         aspect = 4.0 / 3.0;
@@ -206,13 +206,13 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
         switch (frametype) {
             case NUV_EXTRADATA:
                 if (!ctx->rtjpg_video) {
-                    url_fskip(pb, size);
+                    avio_skip(pb, size);
                     break;
                 }
             case NUV_VIDEO:
                 if (ctx->v_id < 0) {
                     av_log(s, AV_LOG_ERROR, "Video packet in file without video stream!\n");
-                    url_fskip(pb, size);
+                    avio_skip(pb, size);
                     break;
                 }
                 ret = av_new_packet(pkt, copyhdrsize + size);
@@ -236,7 +236,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
             case NUV_AUDIO:
                 if (ctx->a_id < 0) {
                     av_log(s, AV_LOG_ERROR, "Audio packet in file without audio stream!\n");
-                    url_fskip(pb, size);
+                    avio_skip(pb, size);
                     break;
                 }
                 ret = av_get_packet(pb, pkt, size);
@@ -250,7 +250,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
                 // contains no data, size value is invalid
                 break;
             default:
-                url_fskip(pb, size);
+                avio_skip(pb, size);
                 break;
         }
     }
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index a79cd3e..af9860b 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -97,7 +97,7 @@ ogg_restore (AVFormatContext * s, int discard)
         for (i = 0; i < ogg->nstreams; i++)
             av_free (ogg->streams[i].buf);
 
-        url_fseek (bc, ost->pos, SEEK_SET);
+        avio_seek (bc, ost->pos, SEEK_SET);
         ogg->curidx = ost->curidx;
         ogg->nstreams = ost->nstreams;
         memcpy(ogg->streams, ost->streams,
@@ -468,7 +468,7 @@ ogg_get_length (AVFormatContext * s)
     end = size > MAX_PAGE_SIZE? size - MAX_PAGE_SIZE: 0;
 
     ogg_save (s);
-    url_fseek (s->pb, end, SEEK_SET);
+    avio_seek (s->pb, end, SEEK_SET);
 
     while (!ogg_read_page (s, &i)){
         if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0 &&
@@ -604,7 +604,7 @@ ogg_read_timestamp (AVFormatContext * s, int stream_index, int64_t * pos_arg,
     AVIOContext *bc = s->pb;
     int64_t pts = AV_NOPTS_VALUE;
     int i;
-    url_fseek(bc, *pos_arg, SEEK_SET);
+    avio_seek(bc, *pos_arg, SEEK_SET);
     ogg_reset(ogg);
 
     while (url_ftell(bc) < pos_limit && !ogg_packet(s, &i, NULL, NULL, pos_arg)) {
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index fc4010d..92591dd 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -69,9 +69,9 @@ static void ogg_update_checksum(AVFormatContext *s, AVIOContext *pb, int64_t crc
 {
     int64_t pos = url_ftell(pb);
     uint32_t checksum = get_checksum(pb);
-    url_fseek(pb, crc_offset, SEEK_SET);
+    avio_seek(pb, crc_offset, SEEK_SET);
     avio_wb32(pb, checksum);
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
 }
 
 static int ogg_write_page(AVFormatContext *s, OGGPage *page, int extra_flags)
diff --git a/libavformat/pcm.c b/libavformat/pcm.c
index 5de23af..def183c 100644
--- a/libavformat/pcm.c
+++ b/libavformat/pcm.c
@@ -49,7 +49,7 @@ int pcm_read_seek(AVFormatContext *s,
 
     /* recompute exact position */
     st->cur_dts = av_rescale(pos, st->time_base.den, byte_rate * (int64_t)st->time_base.num);
-    if ((ret = url_fseek(s->pb, pos + s->data_offset, SEEK_SET)) < 0)
+    if ((ret = avio_seek(s->pb, pos + s->data_offset, SEEK_SET)) < 0)
         return ret;
     return 0;
 }
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 69013c5..a0dc531 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -112,7 +112,7 @@ static int str_read_header(AVFormatContext *s,
     else
         start = 0;
 
-    url_fseek(pb, start, SEEK_SET);
+    avio_seek(pb, start, SEEK_SET);
 
     for(i=0; i<32; i++){
         str->channels[i].video_stream_index=
diff --git a/libavformat/pva.c b/libavformat/pva.c
index ea7db47..150ecb9 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -122,7 +122,7 @@ recover:
             if (pes_signal != 1) {
                 pva_log(s, AV_LOG_WARNING, "expected signaled PES packet, "
                                           "trying to recover\n");
-                url_fskip(pb, length - 9);
+                avio_skip(pb, length - 9);
                 if (!read_packet)
                     return AVERROR(EIO);
                 goto recover;
@@ -182,7 +182,7 @@ static int64_t pva_read_timestamp(struct AVFormatContext *s, int stream_index,
 
     while (*pos < pos_limit) {
         res = AV_NOPTS_VALUE;
-        url_fseek(pb, *pos, SEEK_SET);
+        avio_seek(pb, *pos, SEEK_SET);
 
         pvactx->continue_pes = 0;
         if (read_part_of_packet(s, &res, &length, &streamid, 0)) {
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 2c1fa3c..e8a2bbd 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -93,7 +93,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     avio_rb32(pb);                    // "RIFF"
     s->file_size = avio_rl32(pb) + 8;
-    url_fskip(pb, 8 + 4 + 1 + 1);    // "QLCMfmt " + chunk-size + major-version + minor-version
+    avio_skip(pb, 8 + 4 + 1 + 1);    // "QLCMfmt " + chunk-size + major-version + minor-version
 
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->channels   = 1;
@@ -110,13 +110,13 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap)
         av_log(s, AV_LOG_ERROR, "Unknown codec GUID.\n");
         return AVERROR_INVALIDDATA;
     }
-    url_fskip(pb, 2 + 80); // codec-version + codec-name
+    avio_skip(pb, 2 + 80); // codec-version + codec-name
     st->codec->bit_rate = avio_rl16(pb);
 
     s->packet_size = avio_rl16(pb);
-    url_fskip(pb, 2); // block-size
+    avio_skip(pb, 2); // block-size
     st->codec->sample_rate = avio_rl16(pb);
-    url_fskip(pb, 2); // sample-size
+    avio_skip(pb, 2); // sample-size
 
     memset(c->rates_per_mode, -1, sizeof(c->rates_per_mode));
     nb_rates = avio_rl32(pb);
@@ -129,7 +129,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap)
         } else
             c->rates_per_mode[mode] = size;
     }
-    url_fskip(pb, 16 - 2*nb_rates + 20); // empty entries of rate-map-table + reserved
+    avio_skip(pb, 16 - 2*nb_rates + 20); // empty entries of rate-map-table + reserved
 
     return 0;
 }
@@ -174,14 +174,14 @@ static int qcp_read_packet(AVFormatContext *s, AVPacket *pkt)
         case MKTAG('v', 'r', 'a', 't'):
             if (avio_rl32(pb)) // var-rate-flag
                 s->packet_size = 0;
-            url_fskip(pb, 4); // size-in-packets
+            avio_skip(pb, 4); // size-in-packets
             break;
         case MKTAG('d', 'a', 't', 'a'):
             c->data_size = chunk_size;
             break;
 
         default:
-            url_fskip(pb, chunk_size);
+            avio_skip(pb, chunk_size);
         }
     }
     return AVERROR_EOF;
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index bb39e03..1f7eb96 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -72,7 +72,7 @@ static int r3d_read_red1(AVFormatContext *s)
     tmp = avio_rb32(s->pb); // filenum
     av_dlog(s, "filenum %d\n", tmp);
 
-    url_fskip(s->pb, 32); // unknown
+    avio_skip(s->pb, 32); // unknown
 
     st->codec->width  = avio_rb32(s->pb);
     st->codec->height = avio_rb32(s->pb);
@@ -152,7 +152,7 @@ static void r3d_read_reos(AVFormatContext *s)
     tmp = avio_rb32(s->pb);
     av_dlog(s, "num audio chunks %d\n", tmp);
 
-    url_fskip(s->pb, 6*4);
+    avio_skip(s->pb, 6*4);
 }
 
 static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
@@ -180,7 +180,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (url_is_streamed(s->pb))
         return 0;
     // find REOB/REOF/REOS to load index
-    url_fseek(s->pb, url_fsize(s->pb)-48-8, SEEK_SET);
+    avio_seek(s->pb, url_fsize(s->pb)-48-8, SEEK_SET);
     if (read_atom(s, &atom) < 0)
         av_log(s, AV_LOG_ERROR, "error reading end atom\n");
 
@@ -192,7 +192,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
     r3d_read_reos(s);
 
     if (r3d->rdvo_offset) {
-        url_fseek(s->pb, r3d->rdvo_offset, SEEK_SET);
+        avio_seek(s->pb, r3d->rdvo_offset, SEEK_SET);
         if (read_atom(s, &atom) < 0)
             av_log(s, AV_LOG_ERROR, "error reading 'rdvo' atom\n");
         if (atom.tag == MKTAG('R','D','V','O')) {
@@ -202,7 +202,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
     }
 
  out:
-    url_fseek(s->pb, s->data_offset, SEEK_SET);
+    avio_seek(s->pb, s->data_offset, SEEK_SET);
     return 0;
 }
 
@@ -332,7 +332,7 @@ static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt)
             break;
         default:
         skip:
-            url_fskip(s->pb, atom.size-8);
+            avio_skip(s->pb, atom.size-8);
         }
     }
     return err;
@@ -359,7 +359,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
     av_dlog(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time);
 
     if (frame_num < r3d->video_offsets_count) {
-        url_fseek(s->pb, r3d->video_offsets_count, SEEK_SET);
+        avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET);
     } else {
         av_log(s, AV_LOG_ERROR, "could not seek to frame %d\n", frame_num);
         return -1;
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index ad84a6c..9e4b78c 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -161,20 +161,20 @@ rdt_load_mdpr (PayloadContext *rdt, AVStream *st, int rule_nr)
         num = avio_rb16(&pb);
         if (rule_nr < 0 || rule_nr >= num)
             return -1;
-        url_fskip(&pb, rule_nr * 2);
+        avio_skip(&pb, rule_nr * 2);
         chunk_nr = avio_rb16(&pb);
-        url_fskip(&pb, (num - 1 - rule_nr) * 2);
+        avio_skip(&pb, (num - 1 - rule_nr) * 2);
 
         /* read MDPR chunks */
         num = avio_rb16(&pb);
         if (chunk_nr >= num)
             return -1;
         while (chunk_nr--)
-            url_fskip(&pb, avio_rb32(&pb));
+            avio_skip(&pb, avio_rb32(&pb));
         size = avio_rb32(&pb);
     } else {
         size = rdt->mlti_data_size;
-        url_fseek(&pb, 0, SEEK_SET);
+        avio_seek(&pb, 0, SEEK_SET);
     }
     if (ff_rm_read_mdpr_codecdata(rdt->rmctx, &pb, st, rdt->rmst[st->index], size) < 0)
         return -1;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 4e21b1c..907b4b5 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -332,9 +332,9 @@ void ff_end_tag(AVIOContext *pb, int64_t start)
     int64_t pos;
 
     pos = url_ftell(pb);
-    url_fseek(pb, start - 4, SEEK_SET);
+    avio_seek(pb, start - 4, SEEK_SET);
     avio_wl32(pb, (uint32_t)(pos - start));
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
 }
 
 /* WAVEFORMATEX header */
@@ -501,7 +501,7 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
             codec->bits_per_coded_sample = avio_rl16(pb);
             codec->channel_layout = avio_rl32(pb); /* dwChannelMask */
             id = avio_rl32(pb); /* 4 first bytes of GUID */
-            url_fskip(pb, 12); /* skip end of GUID */
+            avio_skip(pb, 12); /* skip end of GUID */
             cbSize -= 22;
             size -= 22;
         }
@@ -514,7 +514,7 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
 
         /* It is possible for the chunk to contain garbage at the end */
         if (size > 0)
-            url_fskip(pb, size);
+            avio_skip(pb, size);
     }
     codec->codec_id = ff_wav_codec_get_id(id, codec->bits_per_coded_sample);
     if (codec->codec_id == CODEC_ID_AAC_LATM) {
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index 16e029f..93d4c34 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -95,7 +95,7 @@ static av_cold int rl2_read_header(AVFormatContext *s,
     int i;
     int ret = 0;
 
-    url_fskip(pb,4);          /* skip FORM tag */
+    avio_skip(pb,4);          /* skip FORM tag */
     back_size = avio_rl32(pb); /**< get size of the background frame */
     signature = avio_rb32(pb);
     data_size = avio_rb32(pb);
@@ -237,7 +237,7 @@ static int rl2_read_packet(AVFormatContext *s,
     ++rl2->index_pos[stream_id];
 
     /** position the stream (will probably be there anyway) */
-    url_fseek(pb, sample->pos, SEEK_SET);
+    avio_seek(pb, sample->pos, SEEK_SET);
 
     /** fill the packet */
     ret = av_get_packet(pb, pkt, sample->size);
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index c34d128..a76c244 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -132,7 +132,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
     if (version == 3) {
         int header_size = avio_rb16(pb);
         int64_t startpos = url_ftell(pb);
-        url_fskip(pb, 14);
+        avio_skip(pb, 14);
         rm_read_metadata(s, 0);
         if ((startpos + header_size) >= url_ftell(pb) + 2) {
             // fourcc (should always be "lpcJ")
@@ -141,7 +141,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
         }
         // Skip extra header crap (this should never happen)
         if ((startpos + header_size) > url_ftell(pb))
-            url_fskip(pb, header_size + startpos - url_ftell(pb));
+            avio_skip(pb, header_size + startpos - url_ftell(pb));
         st->codec->sample_rate = 8000;
         st->codec->channels = 1;
         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -150,7 +150,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
         int flavor, sub_packet_h, coded_framesize, sub_packet_size;
         int codecdata_length;
         /* old version (4) */
-        url_fskip(pb, 2); /* unused */
+        avio_skip(pb, 2); /* unused */
         avio_rb32(pb); /* .ra4 */
         avio_rb32(pb); /* data size */
         avio_rb16(pb); /* version2 */
@@ -321,7 +321,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
 skip:
     /* skip codec info */
     size = url_ftell(pb) - codec_pos;
-    url_fskip(pb, codec_data_size - size);
+    avio_skip(pb, codec_data_size - size);
 
     return 0;
 }
@@ -340,7 +340,7 @@ static int rm_read_index(AVFormatContext *s)
         size     = avio_rb32(pb);
         if (size < 20)
             return -1;
-        url_fskip(pb, 2);
+        avio_skip(pb, 2);
         n_pkts   = avio_rb32(pb);
         str_id   = avio_rb16(pb);
         next_off = avio_rb32(pb);
@@ -353,17 +353,17 @@ static int rm_read_index(AVFormatContext *s)
             goto skip;
 
         for (n = 0; n < n_pkts; n++) {
-            url_fskip(pb, 2);
+            avio_skip(pb, 2);
             pts = avio_rb32(pb);
             pos = avio_rb32(pb);
-            url_fskip(pb, 4); /* packet no. */
+            avio_skip(pb, 4); /* packet no. */
 
             av_add_index_entry(st, pos, pts, 0, 0, AVINDEX_KEYFRAME);
         }
 
 skip:
         if (next_off && url_ftell(pb) != next_off &&
-            url_fseek(pb, next_off, SEEK_SET) < 0)
+            avio_seek(pb, next_off, SEEK_SET) < 0)
             return -1;
     } while (next_off);
 
@@ -469,7 +469,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
             goto header_end;
         default:
             /* unknown tag: skip it */
-            url_fskip(pb, tag_size - 10);
+            avio_skip(pb, tag_size - 10);
             break;
         }
     }
@@ -482,9 +482,9 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (!data_off)
         data_off = url_ftell(pb) - 18;
     if (indx_off && !url_is_streamed(pb) && !(s->flags & AVFMT_FLAG_IGNIDX) &&
-        url_fseek(pb, indx_off, SEEK_SET) >= 0) {
+        avio_seek(pb, indx_off, SEEK_SET) >= 0) {
         rm_read_index(s);
-        url_fseek(pb, data_off + 18, SEEK_SET);
+        avio_seek(pb, data_off + 18, SEEK_SET);
     }
 
     return 0;
@@ -529,7 +529,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
             if(state == MKBETAG('I', 'N', 'D', 'X')){
                 int n_pkts, expected_len;
                 len = avio_rb32(pb);
-                url_fskip(pb, 2);
+                avio_skip(pb, 2);
                 n_pkts = avio_rb32(pb);
                 expected_len = 20 + n_pkts * 14;
                 if (len == 20)
@@ -566,7 +566,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
         if (i == s->nb_streams) {
 skip:
             /* skip packet if unknown number */
-            url_fskip(pb, len);
+            avio_skip(pb, len);
             rm->remaining_len = 0;
             continue;
         }
@@ -904,7 +904,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
     if(rm->old_format)
         return AV_NOPTS_VALUE;
 
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
     rm->remaining_len=0;
     for(;;){
         int seq=1;
@@ -929,7 +929,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
                 break;
         }
 
-        url_fskip(s->pb, len);
+        avio_skip(s->pb, len);
     }
     *ppos = pos;
     return dts;
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
index 29a6a35..8a60886 100644
--- a/libavformat/rmenc.c
+++ b/libavformat/rmenc.c
@@ -436,7 +436,7 @@ static int rm_write_trailer(AVFormatContext *s)
 
     if (!url_is_streamed(s->pb)) {
         /* end of file: finish to write header */
-        index_pos = url_fseek(pb, 0, SEEK_CUR);
+        index_pos = avio_seek(pb, 0, SEEK_CUR);
         data_size = index_pos - rm->data_pos;
 
         /* FIXME: write index */
@@ -445,7 +445,7 @@ static int rm_write_trailer(AVFormatContext *s)
         avio_wb32(pb, 0);
         avio_wb32(pb, 0);
 
-        url_fseek(pb, 0, SEEK_SET);
+        avio_seek(pb, 0, SEEK_SET);
         for(i=0;i<s->nb_streams;i++)
             rm->streams[i].total_frames = rm->streams[i].nb_frames;
         rv10_write_header(s, data_size, 0);
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index 5c0a21f..9702fc7 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -250,7 +250,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
     error |= read_line(pb, line, sizeof(line));  // offset to key frame list
 
     // Read the index
-    url_fseek(pb, chunk_catalog_offset, SEEK_SET);
+    avio_seek(pb, chunk_catalog_offset, SEEK_SET);
     total_audio_size = 0;
     for (i = 0; i < number_of_chunks; i++) {
         int64_t offset, video_size, audio_size;
@@ -292,7 +292,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt)
     index_entry = &stream->index_entries[rpl->chunk_number];
 
     if (rpl->frame_in_part == 0)
-        if (url_fseek(pb, index_entry->pos, SEEK_SET) < 0)
+        if (avio_seek(pb, index_entry->pos, SEEK_SET) < 0)
             return AVERROR(EIO);
 
     if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
@@ -303,7 +303,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt)
 
         frame_flags = avio_rl32(pb);
         frame_size = avio_rl32(pb);
-        if (url_fseek(pb, -8, SEEK_CUR) < 0)
+        if (avio_seek(pb, -8, SEEK_CUR) < 0)
             return AVERROR(EIO);
 
         ret = av_get_packet(pb, pkt, frame_size);
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index 9c5ee9b..c776a1a 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -91,9 +91,9 @@ static int rso_write_trailer(AVFormatContext *s)
     }
 
     /* update file size */
-    url_fseek(pb, 2, SEEK_SET);
+    avio_seek(pb, 2, SEEK_SET);
     avio_wb16(pb, coded_file_size);
-    url_fseek(pb, file_size, SEEK_SET);
+    avio_seek(pb, file_size, SEEK_SET);
 
     put_flush_packet(pb);
 
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index f949725..414ea7a 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -187,11 +187,11 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
                 flags |= RTP_FLAG_KEY;
             len_off = avio_rb24(pb);
             if (mflags & 0x20)   /**< relative timestamp */
-                url_fskip(pb, 4);
+                avio_skip(pb, 4);
             if (mflags & 0x10)   /**< has duration */
-                url_fskip(pb, 4);
+                avio_skip(pb, 4);
             if (mflags & 0x8)    /**< has location ID */
-                url_fskip(pb, 4);
+                avio_skip(pb, 4);
             off = url_ftell(pb);
 
             if (!(mflags & 0x40)) {
@@ -214,7 +214,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
                     return AVERROR(EIO);
 
                 avio_write(asf->pktbuf, buf + off, len - off);
-                url_fskip(pb, len - off);
+                avio_skip(pb, len - off);
                 if (!(flags & RTP_FLAG_MARKER))
                     return -1;
                 out_len     = url_close_dyn_buf(asf->pktbuf, &asf->buf);
@@ -234,7 +234,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
                 asf->buf = av_realloc(asf->buf, out_len);
                 memcpy(asf->buf + prev_len, buf + off,
                        FFMIN(cur_len, len - off));
-                url_fskip(pb, cur_len);
+                avio_skip(pb, cur_len);
             }
         }
 
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 24052a2..521537d 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -103,7 +103,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
         skip_bits(&gb, 12); // reserved
         data_len = get_bits(&gb, 16);
 
-        url_fseek(&pb, pos + 4, SEEK_SET);
+        avio_seek(&pb, pos + 4, SEEK_SET);
         tag = avio_rl32(&pb);
         if ((st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
                  tag != MKTAG('v','i','d','e')) ||
@@ -149,15 +149,15 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
                 break;
             }
             default:
-                url_fskip(&pb, tlv_len);
+                avio_skip(&pb, tlv_len);
                 break;
             }
         }
 
         /* 32-bit alignment */
-        url_fskip(&pb, ((url_ftell(&pb) + 3) & ~3) - url_ftell(&pb));
+        avio_skip(&pb, ((url_ftell(&pb) + 3) & ~3) - url_ftell(&pb));
     } else
-        url_fseek(&pb, 4, SEEK_SET);
+        avio_seek(&pb, 4, SEEK_SET);
 
     if (has_packet_info) {
         av_log_missing_feature(s, "RTP-X-QT with packet specific info", 1);
diff --git a/libavformat/sauce.c b/libavformat/sauce.c
index e861b14..efcee66 100644
--- a/libavformat/sauce.c
+++ b/libavformat/sauce.c
@@ -35,7 +35,7 @@ int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int g
     int datatype, filetype, t1, t2, nb_comments, flags;
     uint64_t start_pos = url_fsize(pb) - 128;
 
-    url_fseek(pb, start_pos, SEEK_SET);
+    avio_seek(pb, start_pos, SEEK_SET);
     if (avio_read(pb, buf, 7) != 7)
         return -1;
     if (memcmp(buf, "SAUCE00", 7))
@@ -51,14 +51,14 @@ int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int g
     GET_SAUCE_META("artist",    20)
     GET_SAUCE_META("publisher", 20)
     GET_SAUCE_META("date",      8)
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
     datatype    = avio_r8(pb);
     filetype    = avio_r8(pb);
     t1          = avio_rl16(pb);
     t2          = avio_rl16(pb);
     nb_comments = avio_r8(pb);
     flags       = avio_r8(pb);
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
     GET_SAUCE_META("encoder",   22);
 
     if (got_width && datatype && filetype) {
@@ -82,7 +82,7 @@ int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int g
     *fsize -= 128;
 
     if (nb_comments > 0) {
-        url_fseek(pb, start_pos - 64*nb_comments - 5, SEEK_SET);
+        avio_seek(pb, start_pos - 64*nb_comments - 5, SEEK_SET);
         if (avio_read(pb, buf, 5) == 5 && !memcmp(buf, "COMNT", 5)) {
             int i;
             char *str = av_malloc(65*nb_comments + 1);
diff --git a/libavformat/seek.c b/libavformat/seek.c
index 26b622f..9fee911 100644
--- a/libavformat/seek.c
+++ b/libavformat/seek.c
@@ -313,7 +313,7 @@ int64_t ff_gen_syncpoint_search(AVFormatContext *s,
     step = s->pb->buffer_size;
     curpos = FFMAX(pos - step / 2, 0);
     for (;;) {
-        url_fseek(s->pb, curpos, SEEK_SET);
+        avio_seek(s->pb, curpos, SEEK_SET);
         search_hi_lo_keyframes(s,
                                ts, time_base,
                                flags,
@@ -385,7 +385,7 @@ int64_t ff_gen_syncpoint_search(AVFormatContext *s,
         }
     }
 
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
     av_free(sync);
     return pos;
 }
@@ -456,7 +456,7 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
     if (!state)
         return;
 
-    url_fseek(s->pb, state->fpos, SEEK_SET);
+    avio_seek(s->pb, state->fpos, SEEK_SET);
 
     // copy context structures
     s->cur_st                           = state->cur_st;
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 906cb91..7b68990 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -217,7 +217,7 @@ static int film_read_packet(AVFormatContext *s,
     sample = &film->sample_table[film->current_sample];
 
     /* position the stream (will probably be there anyway) */
-    url_fseek(pb, sample->sample_offset, SEEK_SET);
+    avio_seek(pb, sample->sample_offset, SEEK_SET);
 
     /* do a special song and dance when loading FILM Cinepak chunks */
     if ((sample->stream == film->video_stream_index) &&
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index 3239386..7787465 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -95,7 +95,7 @@ static int vmd_read_header(AVFormatContext *s,
     int sound_buffers;
 
     /* fetch the main header, including the 2 header length bytes */
-    url_fseek(pb, 0, SEEK_SET);
+    avio_seek(pb, 0, SEEK_SET);
     if (avio_read(pb, vmd->vmd_header, VMD_HEADER_SIZE) != VMD_HEADER_SIZE)
         return AVERROR(EIO);
 
@@ -155,7 +155,7 @@ static int vmd_read_header(AVFormatContext *s,
     toc_offset = AV_RL32(&vmd->vmd_header[812]);
     vmd->frame_count = AV_RL16(&vmd->vmd_header[6]);
     vmd->frames_per_block = AV_RL16(&vmd->vmd_header[18]);
-    url_fseek(pb, toc_offset, SEEK_SET);
+    avio_seek(pb, toc_offset, SEEK_SET);
 
     raw_frame_table = NULL;
     vmd->frame_table = NULL;
@@ -243,7 +243,7 @@ static int vmd_read_packet(AVFormatContext *s,
 
     frame = &vmd->frame_table[vmd->current_frame];
     /* position the stream (will probably be there already) */
-    url_fseek(pb, frame->frame_offset, SEEK_SET);
+    avio_seek(pb, frame->frame_offset, SEEK_SET);
 
     if (av_new_packet(pkt, frame->frame_size + BYTES_PER_FRAME_RECORD))
         return AVERROR(ENOMEM);
diff --git a/libavformat/siff.c b/libavformat/siff.c
index 1d24c6a..d0f682b 100644
--- a/libavformat/siff.c
+++ b/libavformat/siff.c
@@ -103,7 +103,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb)
     }
     width = avio_rl16(pb);
     height = avio_rl16(pb);
-    url_fskip(pb, 4);
+    avio_skip(pb, 4);
     c->frames = avio_rl16(pb);
     if(!c->frames){
         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)
     c->rate = avio_rl16(pb);
     c->block_align = c->rate * (c->bits >> 3);
 
-    url_fskip(pb, 16); //zeroes
+    avio_skip(pb, 16); //zeroes
 
     st = av_new_stream(s, 0);
     if (!st)
@@ -145,7 +145,7 @@ static int siff_parse_soun(AVFormatContext *s, SIFFContext *c, AVIOContext *pb)
         av_log(s, AV_LOG_ERROR, "Header chunk size is incorrect\n");
         return -1;
     }
-    url_fskip(pb, 4); //unknown value
+    avio_skip(pb, 4); //unknown value
     c->rate = avio_rl16(pb);
     c->bits = avio_rl16(pb);
     c->block_align = c->rate * (c->bits >> 3);
@@ -160,7 +160,7 @@ static int siff_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     if (avio_rl32(pb) != TAG_SIFF)
         return -1;
-    url_fskip(pb, 4); //ignore size
+    avio_skip(pb, 4); //ignore size
     tag = avio_rl32(pb);
 
     if (tag != TAG_VBV1 && tag != TAG_SOUN){
@@ -176,7 +176,7 @@ static int siff_read_header(AVFormatContext *s, AVFormatParameters *ap)
         av_log(s, AV_LOG_ERROR, "'BODY' chunk is missing\n");
         return -1;
     }
-    url_fskip(pb, 4); //ignore size
+    avio_skip(pb, 4); //ignore size
 
     return 0;
 }
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 42d3672..8feb4e5f 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -240,7 +240,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     /* if we demuxed all streams, pass another frame */
     if(smk->curstream < 0) {
-        url_fseek(s->pb, smk->nextpos, 0);
+        avio_seek(s->pb, smk->nextpos, 0);
         frame_size = smk->frm_size[smk->cur_frame] & (~3);
         flags = smk->frm_flags[smk->cur_frame];
         /* handle palette change event */
@@ -279,7 +279,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
                     sz++;
                 }
             }
-            url_fseek(s->pb, pos, 0);
+            avio_seek(s->pb, pos, 0);
             palchange |= 1;
         }
         flags >>= 1;
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index b668834..5e1e220 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -58,14 +58,14 @@ static int sox_read_header(AVFormatContext *s,
     if (avio_rl32(pb) == SOX_TAG) {
         st->codec->codec_id = CODEC_ID_PCM_S32LE;
         header_size         = avio_rl32(pb);
-        url_fskip(pb, 8); /* sample count */
+        avio_skip(pb, 8); /* sample count */
         sample_rate         = av_int2dbl(avio_rl64(pb));
         st->codec->channels = avio_rl32(pb);
         comment_size        = avio_rl32(pb);
     } else {
         st->codec->codec_id = CODEC_ID_PCM_S32BE;
         header_size         = avio_rb32(pb);
-        url_fskip(pb, 8); /* sample count */
+        avio_skip(pb, 8); /* sample count */
         sample_rate         = av_int2dbl(avio_rb64(pb));
         st->codec->channels = avio_rb32(pb);
         comment_size        = avio_rb32(pb);
@@ -105,7 +105,7 @@ static int sox_read_header(AVFormatContext *s,
                                AV_METADATA_DONT_STRDUP_VAL);
     }
 
-    url_fskip(pb, header_size - SOX_FIXED_HDR - comment_size);
+    avio_skip(pb, header_size - SOX_FIXED_HDR - comment_size);
 
     st->codec->sample_rate           = sample_rate;
     st->codec->bits_per_coded_sample = 32;
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index 9c06dd7..dbb2972 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -100,12 +100,12 @@ static int sox_write_trailer(AVFormatContext *s)
         /* update number of samples */
         int64_t file_size = url_ftell(pb);
         int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL;
-        url_fseek(pb, 8, SEEK_SET);
+        avio_seek(pb, 8, SEEK_SET);
         if (enc->codec_id == CODEC_ID_PCM_S32LE) {
             avio_wl64(pb, num_samples);
         } else
             avio_wb64(pb, num_samples);
-        url_fseek(pb, file_size, SEEK_SET);
+        avio_seek(pb, file_size, SEEK_SET);
 
         put_flush_packet(pb);
     }
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c
index 2fc5672..c81cccb 100644
--- a/libavformat/spdifdec.c
+++ b/libavformat/spdifdec.c
@@ -201,7 +201,7 @@ static int spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     /* skip over the padding to the beginning of the next frame */
-    url_fskip(pb, offset - pkt->size - BURST_HEADER_SIZE);
+    avio_skip(pb, offset - pkt->size - BURST_HEADER_SIZE);
 
     if (!s->nb_streams) {
         /* first packet, create a stream */
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index c567f26..91418f7 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -70,7 +70,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
     /* skip rectangle size */
     nbits = avio_r8(pb) >> 3;
     len = (4 * nbits - 3 + 7) / 8;
-    url_fskip(pb, len);
+    avio_skip(pb, len);
     swf->frame_rate = avio_rl16(pb); /* 8.8 fixed */
     avio_rl16(pb); /* frame count */
 
@@ -159,7 +159,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
                 st = s->streams[i];
                 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
             if (st->codec->codec_id == CODEC_ID_MP3) {
-                url_fskip(pb, 4);
+                avio_skip(pb, 4);
                 av_get_packet(pb, pkt, len-4);
             } else { // ADPCM, PCM
                 av_get_packet(pb, pkt, len);
@@ -202,7 +202,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
             return pkt->size;
         }
     skip:
-        url_fskip(pb, len);
+        avio_skip(pb, len);
     }
     return 0;
 }
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 296b9c2..c898c0e 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -50,7 +50,7 @@ static void put_swf_end_tag(AVFormatContext *s)
     pos = url_ftell(pb);
     tag_len = pos - swf->tag_pos - 2;
     tag = swf->tag;
-    url_fseek(pb, swf->tag_pos, SEEK_SET);
+    avio_seek(pb, swf->tag_pos, SEEK_SET);
     if (tag & TAG_LONG) {
         tag &= ~TAG_LONG;
         avio_wl16(pb, (tag << 6) | 0x3f);
@@ -59,7 +59,7 @@ static void put_swf_end_tag(AVFormatContext *s)
         assert(tag_len < 0x3f);
         avio_wl16(pb, (tag << 6) | tag_len);
     }
-    url_fseek(pb, pos, SEEK_SET);
+    avio_seek(pb, pos, SEEK_SET);
 }
 
 static inline void max_nbits(int *nbits_ptr, int val)
@@ -494,13 +494,13 @@ static int swf_write_trailer(AVFormatContext *s)
     /* patch file size and number of frames if not streamed */
     if (!url_is_streamed(s->pb) && video_enc) {
         file_size = url_ftell(pb);
-        url_fseek(pb, 4, SEEK_SET);
+        avio_seek(pb, 4, SEEK_SET);
         avio_wl32(pb, file_size);
-        url_fseek(pb, swf->duration_pos, SEEK_SET);
+        avio_seek(pb, swf->duration_pos, SEEK_SET);
         avio_wl16(pb, swf->video_frame_number);
-        url_fseek(pb, swf->vframes_pos, SEEK_SET);
+        avio_seek(pb, swf->vframes_pos, SEEK_SET);
         avio_wl16(pb, swf->video_frame_number);
-        url_fseek(pb, file_size, SEEK_SET);
+        avio_seek(pb, file_size, SEEK_SET);
     }
     return 0;
 }
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 39a8bc2..2d1f74e 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -81,7 +81,7 @@ static int thp_read_header(AVFormatContext *s,
     thp->next_frame      = thp->first_frame;
 
     /* Read the component structure.  */
-    url_fseek (pb, thp->compoff, SEEK_SET);
+    avio_seek (pb, thp->compoff, SEEK_SET);
     thp->compcount       = avio_rb32(pb);
 
     /* Read the list of component types.  */
@@ -149,7 +149,7 @@ static int thp_read_packet(AVFormatContext *s,
         if (thp->frame >= thp->framecnt)
             return AVERROR(EIO);
 
-        url_fseek(pb, thp->next_frame, SEEK_SET);
+        avio_seek(pb, thp->next_frame, SEEK_SET);
 
         /* Locate the next frame and read out its size.  */
         thp->next_frame += thp->next_framesz;
diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c
index e368b17..f8a5db1 100644
--- a/libavformat/tiertexseq.c
+++ b/libavformat/tiertexseq.c
@@ -83,7 +83,7 @@ static int seq_init_frame_buffers(SeqDemuxContext *seq, AVIOContext *pb)
     int i, sz;
     TiertexSeqFrameBuffer *seq_buffer;
 
-    url_fseek(pb, 256, SEEK_SET);
+    avio_seek(pb, 256, SEEK_SET);
 
     for (i = 0; i < SEQ_NUM_FRAME_BUFFERS; i++) {
         sz = avio_rl16(pb);
@@ -113,7 +113,7 @@ static int seq_fill_buffer(SeqDemuxContext *seq, AVIOContext *pb, int buffer_num
     if (seq_buffer->fill_size + data_size > seq_buffer->data_size || data_size <= 0)
         return AVERROR_INVALIDDATA;
 
-    url_fseek(pb, seq->current_frame_offs + data_offs, SEEK_SET);
+    avio_seek(pb, seq->current_frame_offs + data_offs, SEEK_SET);
     if (avio_read(pb, seq_buffer->data + seq_buffer->fill_size, data_size) != data_size)
         return AVERROR(EIO);
 
@@ -128,7 +128,7 @@ static int seq_parse_frame_data(SeqDemuxContext *seq, AVIOContext *pb)
     int i, e, err;
 
     seq->current_frame_offs += SEQ_FRAME_SIZE;
-    url_fseek(pb, seq->current_frame_offs, SEEK_SET);
+    avio_seek(pb, seq->current_frame_offs, SEEK_SET);
 
     /* sound data */
     seq->current_audio_data_offs = avio_rl16(pb);
@@ -256,7 +256,7 @@ static int seq_read_packet(AVFormatContext *s, AVPacket *pkt)
             pkt->data[0] = 0;
             if (seq->current_pal_data_size) {
                 pkt->data[0] |= 1;
-                url_fseek(pb, seq->current_frame_offs + seq->current_pal_data_offs, SEEK_SET);
+                avio_seek(pb, seq->current_frame_offs + seq->current_pal_data_offs, SEEK_SET);
                 if (avio_read(pb, &pkt->data[1], seq->current_pal_data_size) != seq->current_pal_data_size)
                     return AVERROR(EIO);
             }
@@ -279,7 +279,7 @@ static int seq_read_packet(AVFormatContext *s, AVPacket *pkt)
     if (seq->current_audio_data_offs == 0) /* end of data reached */
         return AVERROR(EIO);
 
-    url_fseek(pb, seq->current_frame_offs + seq->current_audio_data_offs, SEEK_SET);
+    avio_seek(pb, seq->current_frame_offs + seq->current_audio_data_offs, SEEK_SET);
     rc = av_get_packet(pb, pkt, seq->current_audio_data_size);
     if (rc < 0)
         return rc;
diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index 3fe9e65..0a16ae1 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -152,7 +152,7 @@ static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt)
     ret = av_get_packet(pb, pkt, pkt_size);
 
     if (tmv->stream_index)
-        url_fskip(pb, tmv->padding);
+        avio_skip(pb, tmv->padding);
 
     pkt->stream_index  = tmv->stream_index;
     tmv->stream_index ^= 1;
@@ -173,7 +173,7 @@ static int tmv_read_seek(AVFormatContext *s, int stream_index,
     pos = timestamp *
           (tmv->audio_chunk_size + tmv->video_chunk_size + tmv->padding);
 
-    url_fseek(s->pb, pos + TMV_HEADER_SIZE, SEEK_SET);
+    avio_seek(s->pb, pos + TMV_HEADER_SIZE, SEEK_SET);
     tmv->stream_index = 0;
     return 0;
 }
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 61a41df..3bfeec8 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -50,7 +50,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (avio_rl32(s->pb) != AV_RL32("TTA1"))
         return -1; // not tta file
 
-    url_fskip(s->pb, 2); // FIXME: flags
+    avio_skip(s->pb, 2); // FIXME: flags
     channels = avio_rl16(s->pb);
     bps = avio_rl16(s->pb);
     samplerate = avio_rl32(s->pb);
@@ -65,7 +65,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return -1;
     }
 
-    url_fskip(s->pb, 4); // header crc
+    avio_skip(s->pb, 4); // header crc
 
     framelen = samplerate*256/245;
     c->totalframes = datalen / framelen + ((datalen % framelen) ? 1 : 0);
@@ -91,7 +91,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
         av_add_index_entry(st, framepos, i*framelen, size, 0, AVINDEX_KEYFRAME);
         framepos += size;
     }
-    url_fskip(s->pb, 4); // seektable crc
+    avio_skip(s->pb, 4); // seektable crc
 
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_TTA;
@@ -106,7 +106,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return -1;
     }
     st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
-    url_fseek(s->pb, start_offset, SEEK_SET);
+    avio_seek(s->pb, start_offset, SEEK_SET);
     avio_read(s->pb, st->codec->extradata, st->codec->extradata_size);
 
     return 0;
@@ -138,7 +138,7 @@ static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
         return -1;
 
     c->currentframe = index;
-    url_fseek(s->pb, st->index_entries[index].pos, SEEK_SET);
+    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
 
     return 0;
 }
diff --git a/libavformat/tty.c b/libavformat/tty.c
index 767006b..7475058 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -46,7 +46,7 @@ static int efi_read(AVFormatContext *avctx, uint64_t start_pos)
     char buf[37];
     int len;
 
-    url_fseek(pb, start_pos, SEEK_SET);
+    avio_seek(pb, start_pos, SEEK_SET);
     if (avio_r8(pb) != 0x1A)
         return -1;
 
@@ -95,7 +95,7 @@ static int read_header(AVFormatContext *avctx,
         if (ff_sauce_read(avctx, &s->fsize, 0, 0) < 0)
             efi_read(avctx, s->fsize - 51);
 
-        url_fseek(avctx->pb, 0, SEEK_SET);
+        avio_seek(avctx->pb, 0, SEEK_SET);
     }
 
     return 0;
diff --git a/libavformat/txd.c b/libavformat/txd.c
index 92a0c09..05eb0ce 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -73,7 +73,7 @@ next_chunk:
             if (chunk_size > 100)
                 break;
         case TXD_EXTRA:
-            url_fskip(s->pb, chunk_size);
+            avio_skip(s->pb, chunk_size);
         case TXD_FILE:
         case TXD_TEXTURE:
             goto next_chunk;
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1f0164f..70da4ca 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1531,7 +1531,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
         return -1;
 
     /* do the seek */
-    if ((ret = url_fseek(s->pb, pos, SEEK_SET)) < 0)
+    if ((ret = avio_seek(s->pb, pos, SEEK_SET)) < 0)
         return ret;
 
     av_update_cur_dts(s, st, ts);
@@ -1671,7 +1671,7 @@ static int av_seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos,
     if     (pos < pos_min) pos= pos_min;
     else if(pos > pos_max) pos= pos_max;
 
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
 
 #if 0
     av_update_cur_dts(s, st, ts);
@@ -1701,11 +1701,11 @@ static int av_seek_frame_generic(AVFormatContext *s,
         if(st->nb_index_entries){
             assert(st->index_entries);
             ie= &st->index_entries[st->nb_index_entries-1];
-            if ((ret = url_fseek(s->pb, ie->pos, SEEK_SET)) < 0)
+            if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0)
                 return ret;
             av_update_cur_dts(s, st, ie->timestamp);
         }else{
-            if ((ret = url_fseek(s->pb, s->data_offset, SEEK_SET)) < 0)
+            if ((ret = avio_seek(s->pb, s->data_offset, SEEK_SET)) < 0)
                 return ret;
         }
         for(i=0;; i++) {
@@ -1732,7 +1732,7 @@ static int av_seek_frame_generic(AVFormatContext *s,
             return 0;
     }
     ie = &st->index_entries[index];
-    if ((ret = url_fseek(s->pb, ie->pos, SEEK_SET)) < 0)
+    if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0)
         return ret;
     av_update_cur_dts(s, st, ie->timestamp);
 
@@ -1956,7 +1956,7 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset
     if (offset < 0)
         offset = 0;
 
-    url_fseek(ic->pb, offset, SEEK_SET);
+    avio_seek(ic->pb, offset, SEEK_SET);
     read_size = 0;
     for(;;) {
         if (read_size >= DURATION_MAX_READ_SIZE<<(FFMAX(retry-1,0)))
@@ -1991,7 +1991,7 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset
 
     fill_all_stream_timings(ic);
 
-    url_fseek(ic->pb, old_offset, SEEK_SET);
+    avio_seek(ic->pb, old_offset, SEEK_SET);
     for (i=0; i<ic->nb_streams; i++) {
         st= ic->streams[i];
         st->cur_dts= st->first_dts;
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 838dd43..4ab9bca 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -68,7 +68,7 @@ static int vc1t_read_header(AVFormatContext *s,
     st->codec->width = avio_rl32(pb);
     if(avio_rl32(pb) != 0xC)
         return -1;
-    url_fskip(pb, 8);
+    avio_skip(pb, 8);
     fps = avio_rl32(pb);
     if(fps == 0xFFFFFFFF)
         av_set_pts_info(st, 32, 1, 1000);
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 65889fc..65ac602 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -74,7 +74,7 @@ static int vc1test_write_trailer(AVFormatContext *s)
     AVIOContext *pb = s->pb;
 
     if (!url_is_streamed(s->pb)) {
-        url_fseek(pb, 0, SEEK_SET);
+        avio_seek(pb, 0, SEEK_SET);
         avio_wl24(pb, ctx->frames);
         put_flush_packet(pb);
     }
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 01bbdb2..fa43b41 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -45,13 +45,13 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     int header_size;
     AVStream *st;
 
-    url_fskip(pb, 20);
+    avio_skip(pb, 20);
     header_size = avio_rl16(pb) - 22;
     if (header_size != 4) {
         av_log(s, AV_LOG_ERROR, "unknown header size: %d\n", header_size);
         return AVERROR(ENOSYS);
     }
-    url_fskip(pb, header_size);
+    avio_skip(pb, header_size);
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
@@ -114,13 +114,13 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
             dec->bits_per_coded_sample = avio_r8(pb);
             dec->channels = avio_r8(pb);
             tmp_codec = avio_rl16(pb);
-            url_fskip(pb, 4);
+            avio_skip(pb, 4);
             voc->remaining_size -= 12;
             max_size -= 12;
             break;
 
         default:
-            url_fskip(pb, voc->remaining_size);
+            avio_skip(pb, voc->remaining_size);
             max_size -= voc->remaining_size;
             voc->remaining_size = 0;
             break;
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 8a3d170..c2ca55e 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -72,7 +72,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (!st)
         return AVERROR(ENOMEM);
 
-    url_fskip(s->pb, 12);
+    avio_skip(s->pb, 12);
 
     header_size = avio_rb32(s->pb);
 
@@ -101,7 +101,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
             st->codec->channels = avio_rb32(s->pb) + 1;
             read_bitrate        = avio_rb32(s->pb);
             rate_flag           = avio_rb32(s->pb);
-            url_fskip(s->pb, len-12);
+            avio_skip(s->pb, len-12);
 
             st->codec->bit_rate              = read_bitrate*1000;
             st->codec->bits_per_coded_sample = 16;
@@ -140,7 +140,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
             av_log(s, AV_LOG_ERROR, "Unknown chunk: %c%c%c%c\n",
                    ((char*)&chunk_tag)[0], ((char*)&chunk_tag)[1],
                    ((char*)&chunk_tag)[2], ((char*)&chunk_tag)[3]);
-            url_fskip(s->pb, FFMIN(len, header_size));
+            avio_skip(s->pb, FFMIN(len, header_size));
             break;
         }
 
@@ -240,7 +240,7 @@ static int vqf_read_seek(AVFormatContext *s,
     st->cur_dts = av_rescale(pos, st->time_base.den,
                              st->codec->bit_rate * (int64_t)st->time_base.num);
 
-    if ((ret = url_fseek(s->pb, ((pos-7) >> 3) + s->data_offset, SEEK_SET)) < 0)
+    if ((ret = avio_seek(s->pb, ((pos-7) >> 3) + s->data_offset, SEEK_SET)) < 0)
         return ret;
 
     c->remaining_bits = -7 - ((pos-7)&7);
diff --git a/libavformat/wav.c b/libavformat/wav.c
index a574b3b..2717a0f 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -103,9 +103,9 @@ static int wav_write_trailer(AVFormatContext *s)
 
         /* update file size */
         file_size = url_ftell(pb);
-        url_fseek(pb, 4, SEEK_SET);
+        avio_seek(pb, 4, SEEK_SET);
         avio_wl32(pb, (uint32_t)(file_size - 8));
-        url_fseek(pb, file_size, SEEK_SET);
+        avio_seek(pb, file_size, SEEK_SET);
 
         put_flush_packet(pb);
 
@@ -115,9 +115,9 @@ static int wav_write_trailer(AVFormatContext *s)
             number_of_samples = av_rescale(wav->maxpts - wav->minpts + wav->last_duration,
                                            s->streams[0]->codec->sample_rate * (int64_t)s->streams[0]->time_base.num,
                                            s->streams[0]->time_base.den);
-            url_fseek(pb, wav->data-12, SEEK_SET);
+            avio_seek(pb, wav->data-12, SEEK_SET);
             avio_wl32(pb, number_of_samples);
-            url_fseek(pb, file_size, SEEK_SET);
+            avio_seek(pb, file_size, SEEK_SET);
             put_flush_packet(pb);
         }
     }
@@ -160,7 +160,7 @@ static int64_t find_tag(AVIOContext *pb, uint32_t tag1)
         size = next_tag(pb, &tag);
         if (tag == tag1)
             break;
-        url_fseek(pb, size, SEEK_CUR);
+        avio_seek(pb, size, SEEK_CUR);
     }
     return size;
 }
@@ -217,7 +217,7 @@ static int wav_read_header(AVFormatContext *s,
         avio_rl64(pb); /* RIFF size */
         data_size = avio_rl64(pb);
         sample_count = avio_rl64(pb);
-        url_fskip(pb, size - 16); /* skip rest of ds64 chunk */
+        avio_skip(pb, size - 16); /* skip rest of ds64 chunk */
     }
 
     /* parse fmt header */
@@ -243,7 +243,7 @@ static int wav_read_header(AVFormatContext *s,
             sample_count = avio_rl32(pb);
             size -= 4;
         }
-        url_fseek(pb, size, SEEK_CUR);
+        avio_seek(pb, size, SEEK_CUR);
     }
     if (rf64)
         size = data_size;
@@ -276,7 +276,7 @@ static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16])
             return -1;
         if (!memcmp(guid, guid1, 16))
             return size;
-        url_fskip(pb, FFALIGN(size, INT64_C(8)) - 24);
+        avio_skip(pb, FFALIGN(size, INT64_C(8)) - 24);
     }
     return -1;
 }
@@ -410,7 +410,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     /* subtract chunk header size - normal wav file doesn't count it */
     ff_get_wav_header(pb, st->codec, size - 24);
-    url_fskip(pb, FFALIGN(size, INT64_C(8)) - size);
+    avio_skip(pb, FFALIGN(size, INT64_C(8)) - size);
 
     st->need_parsing = AVSTREAM_PARSE_FULL;
 
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 478b46f..a4dd26b 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -101,7 +101,7 @@ static int wc3_read_header(AVFormatContext *s,
     wc3->vpkt.data = NULL; wc3->vpkt.size = 0;
 
     /* skip the first 3 32-bit numbers */
-    url_fseek(pb, 12, SEEK_CUR);
+    avio_seek(pb, 12, SEEK_CUR);
 
     /* traverse through the chunks and load the header information before
      * the first BRCH tag */
@@ -114,12 +114,12 @@ static int wc3_read_header(AVFormatContext *s,
         case SOND_TAG:
         case INDX_TAG:
             /* SOND unknown, INDX unnecessary; ignore both */
-            url_fseek(pb, size, SEEK_CUR);
+            avio_seek(pb, size, SEEK_CUR);
             break;
 
         case PC__TAG:
             /* number of palettes, unneeded */
-            url_fseek(pb, 12, SEEK_CUR);
+            avio_seek(pb, 12, SEEK_CUR);
             break;
 
         case BNAM_TAG:
@@ -142,7 +142,7 @@ static int wc3_read_header(AVFormatContext *s,
 
         case PALT_TAG:
             /* one of several palettes */
-            url_fseek(pb, -8, SEEK_CUR);
+            avio_seek(pb, -8, SEEK_CUR);
             av_append_packet(pb, &wc3->vpkt, 8 + PALETTE_SIZE);
             break;
 
@@ -219,13 +219,13 @@ static int wc3_read_packet(AVFormatContext *s,
 
         case SHOT_TAG:
             /* load up new palette */
-            url_fseek(pb, -8, SEEK_CUR);
+            avio_seek(pb, -8, SEEK_CUR);
             av_append_packet(pb, &wc3->vpkt, 8 + 4);
             break;
 
         case VGA__TAG:
             /* send out video chunk */
-            url_fseek(pb, -8, SEEK_CUR);
+            avio_seek(pb, -8, SEEK_CUR);
             ret= av_append_packet(pb, &wc3->vpkt, 8 + size);
             // ignore error if we have some data
             if (wc3->vpkt.size > 0)
@@ -240,7 +240,7 @@ static int wc3_read_packet(AVFormatContext *s,
         case TEXT_TAG:
             /* subtitle chunk */
 #if 0
-            url_fseek(pb, size, SEEK_CUR);
+            avio_seek(pb, size, SEEK_CUR);
 #else
             if ((unsigned)size > sizeof(text) || (ret = avio_read(pb, text, size)) != size)
                 ret = AVERROR(EIO);
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index b923fef..adb3531 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -231,7 +231,7 @@ static int wsvqa_read_header(AVFormatContext *s,
     st->codec->codec_tag = 0;  /* no fourcc */
 
     /* skip to the start of the VQA header */
-    url_fseek(pb, 20, SEEK_SET);
+    avio_seek(pb, 20, SEEK_SET);
 
     /* the VQA header needs to go to the decoder */
     st->codec->extradata_size = VQA_HEADER_SIZE;
@@ -303,7 +303,7 @@ static int wsvqa_read_header(AVFormatContext *s,
             break;
         }
 
-        url_fseek(pb, chunk_size, SEEK_CUR);
+        avio_seek(pb, chunk_size, SEEK_CUR);
     } while (chunk_tag != FINF_TAG);
 
     return 0;
@@ -348,7 +348,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
             }
             /* stay on 16-bit alignment */
             if (skip_byte)
-                url_fseek(pb, 1, SEEK_CUR);
+                avio_seek(pb, 1, SEEK_CUR);
 
             return ret;
         } else {
@@ -359,7 +359,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
             default:
                 av_log(s, AV_LOG_INFO, "Skipping unknown chunk 0x%08X\n", chunk_type);
             }
-            url_fseek(pb, chunk_size + skip_byte, SEEK_CUR);
+            avio_seek(pb, chunk_size + skip_byte, SEEK_CUR);
         }
     }
 
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 0ed06aa..d5a34b9 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -98,7 +98,7 @@ static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size)
             int i = wf->position >> wf->sector_bits;
             if (i >= wf->nb_sectors ||
                 (wf->sectors[i] != wf->sectors[i - 1] + (1 << (wf->sector_bits - WTV_SECTOR_BITS)) &&
-                url_fseek(pb, (int64_t)wf->sectors[i] << WTV_SECTOR_BITS, SEEK_SET) < 0)) {
+                avio_seek(pb, (int64_t)wf->sectors[i] << WTV_SECTOR_BITS, SEEK_SET) < 0)) {
                 wf->error = 1;
                 break;
             }
@@ -123,7 +123,7 @@ static int64_t wtvfile_seek(void *opaque, int64_t offset, int whence)
         offset = wf->length;
 
     wf->error = offset < 0 || offset >= wf->length ||
-                url_fseek(pb, ((int64_t)wf->sectors[offset >> wf->sector_bits] << WTV_SECTOR_BITS)
+                avio_seek(pb, ((int64_t)wf->sectors[offset >> wf->sector_bits] << WTV_SECTOR_BITS)
                               + (offset & ((1 << wf->sector_bits) - 1)), SEEK_SET) < 0;
     wf->position = offset;
     return offset;
@@ -159,7 +159,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
     WtvFile *wf;
     uint8_t *buffer;
 
-    if (url_fseek(s->pb, first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0)
+    if (avio_seek(s->pb, first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0)
         return NULL;
 
     wf = av_mallocz(sizeof(WtvFile));
@@ -195,7 +195,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
         }
         wf->nb_sectors = 0;
         for (i = 0; i < nb_sectors1; i++) {
-            if (url_fseek(s->pb, (int64_t)sectors1[i] << WTV_SECTOR_BITS, SEEK_SET) < 0)
+            if (avio_seek(s->pb, (int64_t)sectors1[i] << WTV_SECTOR_BITS, SEEK_SET) < 0)
                 break;
             wf->nb_sectors += read_ints(s->pb, wf->sectors + i * WTV_SECTOR_SIZE / 4, WTV_SECTOR_SIZE / 4);
         }
@@ -222,7 +222,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
 
     /* seek to intial sector */
     wf->position = 0;
-    if (url_fseek(s->pb, (int64_t)wf->sectors[0] << WTV_SECTOR_BITS, SEEK_SET) < 0) {
+    if (avio_seek(s->pb, (int64_t)wf->sectors[0] << WTV_SECTOR_BITS, SEEK_SET) < 0) {
         av_free(wf->sectors);
         av_free(wf);
         return NULL;
@@ -492,7 +492,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
     st->codec->extradata_size = filesize;
     avio_read(pb, st->codec->extradata, filesize);
 done:
-    url_fseek(pb, pos + length, SEEK_SET);
+    avio_seek(pb, pos + length, SEEK_SET);
 }
 
 static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int type, int length)
@@ -539,7 +539,7 @@ static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int ty
     } else {
         av_freep(&buf);
         av_log(s, AV_LOG_WARNING, "unsupported metadata entry; key:%s, type:%d, length:0x%x\n", key, type, length);
-        url_fskip(pb, length);
+        avio_skip(pb, length);
         return;
     }
 
@@ -582,7 +582,7 @@ static int parse_videoinfoheader2(AVFormatContext *s, AVStream *st)
     WtvContext *wtv = s->priv_data;
     AVIOContext *pb = wtv->pb;
 
-    url_fskip(pb, 72);  // picture aspect ratio is unreliable
+    avio_skip(pb, 72);  // picture aspect ratio is unreliable
     ff_get_bmp_header(pb, st);
 
     return 72 + 40;
@@ -658,17 +658,17 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
 
         if (size < 32) {
             av_log(s, AV_LOG_WARNING, "format buffer size underflow\n");
-            url_fskip(pb, size);
+            avio_skip(pb, size);
             return NULL;
         }
 
-        url_fskip(pb, size - 32);
+        avio_skip(pb, size - 32);
         ff_get_guid(pb, &actual_subtype);
         ff_get_guid(pb, &actual_formattype);
-        url_fseek(pb, -size, SEEK_CUR);
+        avio_seek(pb, -size, SEEK_CUR);
 
         st = parse_media_type(s, st, sid, mediatype, actual_subtype, actual_formattype, size - 32);
-        url_fskip(pb, 32);
+        avio_skip(pb, 32);
         return st;
     } else if (!ff_guidcmp(mediatype, mediatype_audio)) {
         st = new_stream(s, st, sid, AVMEDIA_TYPE_AUDIO);
@@ -679,7 +679,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
         } else {
             if (ff_guidcmp(formattype, format_none))
                 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
-            url_fskip(pb, size);
+            avio_skip(pb, size);
         }
 
         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,
             return NULL;
         if (!ff_guidcmp(formattype, format_videoinfo2)) {
             int consumed = parse_videoinfoheader2(s, st);
-            url_fskip(pb, FFMAX(size - consumed, 0));
+            avio_skip(pb, FFMAX(size - consumed, 0));
         } else if (!ff_guidcmp(formattype, format_mpeg2_video)) {
             int consumed = parse_videoinfoheader2(s, st);
-            url_fskip(pb, FFMAX(size - consumed, 0));
+            avio_skip(pb, FFMAX(size - consumed, 0));
         } else {
             if (ff_guidcmp(formattype, format_none))
                 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
-            url_fskip(pb, size);
+            avio_skip(pb, size);
         }
 
         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,
             return NULL;
         if (ff_guidcmp(formattype, format_none))
             av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
-        url_fskip(pb, size);
+        avio_skip(pb, size);
         st->codec->codec_id = CODEC_ID_DVB_SUBTITLE;
         return st;
     } else if (!ff_guidcmp(mediatype, mediatype_mstvcaption) &&
@@ -736,21 +736,21 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
             return NULL;
         if (ff_guidcmp(formattype, format_none))
             av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
-        url_fskip(pb, size);
+        avio_skip(pb, size);
         st->codec->codec_id   = CODEC_ID_DVB_TELETEXT;
         return st;
     } else if (!ff_guidcmp(mediatype, mediatype_mpeg2_sections) &&
                !ff_guidcmp(subtype, mediasubtype_mpeg2_sections)) {
         if (ff_guidcmp(formattype, format_none))
             av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
-        url_fskip(pb, size);
+        avio_skip(pb, size);
         return NULL;
     }
 
     av_log(s, AV_LOG_WARNING, "unknown media type, mediatype:"PRI_GUID
                               ", subtype:"PRI_GUID", formattype:"PRI_GUID"\n",
                               ARG_GUID(mediatype), ARG_GUID(subtype), ARG_GUID(formattype));
-    url_fskip(pb, size);
+    avio_skip(pb, size);
     return NULL;
 }
 
@@ -779,17 +779,17 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
         if (len < 32)
             break;
         sid = avio_rl32(pb) & 0x7FFF;
-        url_fskip(pb, 8);
+        avio_skip(pb, 8);
         consumed = 32;
 
         if (!ff_guidcmp(g, stream_guid)) {
             if (ff_find_stream_index(s, sid) < 0) {
                 ff_asf_guid mediatype, subtype, formattype;
                 int size;
-                url_fskip(pb, 28);
+                avio_skip(pb, 28);
                 ff_get_guid(pb, &mediatype);
                 ff_get_guid(pb, &subtype);
-                url_fskip(pb, 12);
+                avio_skip(pb, 12);
                 ff_get_guid(pb, &formattype);
                 size = avio_rl32(pb);
                 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
             if (stream_index >= 0 && !((WtvStream*)s->streams[stream_index]->priv_data)->seen_data) {
                 ff_asf_guid mediatype, subtype, formattype;
                 int size;
-                url_fskip(pb, 12);
+                avio_skip(pb, 12);
                 ff_get_guid(pb, &mediatype);
                 ff_get_guid(pb, &subtype);
-                url_fskip(pb, 12);
+                avio_skip(pb, 12);
                 ff_get_guid(pb, &formattype);
                 size = avio_rl32(pb);
                 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
                 const uint8_t *pbuf = buf;
                 int buf_size;
 
-                url_fskip(pb, 8);
+                avio_skip(pb, 8);
                 consumed += 8;
                 if (!ff_guidcmp(g, EVENTID_CtxADescriptorSpanningEvent) ||
                     !ff_guidcmp(g, EVENTID_CSDescriptorSpanningEvent)) {
-                    url_fskip(pb, 6);
+                    avio_skip(pb, 6);
                     consumed += 6;
                 }
 
@@ -840,7 +840,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
             if (stream_index >= 0) {
                 AVStream *st = s->streams[stream_index];
                 int audio_type;
-                url_fskip(pb, 8);
+                avio_skip(pb, 8);
                 audio_type = avio_r8(pb);
                 if (audio_type == 2)
                     st->disposition |= AV_DISPOSITION_HEARING_IMPAIRED;
@@ -851,7 +851,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
         } else if (!ff_guidcmp(g, EVENTID_DVBScramblingControlSpanningEvent)) {
             int stream_index = ff_find_stream_index(s, sid);
             if (stream_index >= 0) {
-                url_fskip(pb, 12);
+                avio_skip(pb, 12);
                 if (avio_rl32(pb))
                     av_log(s, AV_LOG_WARNING, "DVB scrambled stream detected (st:%d), decoding will likely fail\n", stream_index);
                 consumed += 16;
@@ -861,7 +861,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
             if (stream_index >= 0) {
                 AVStream *st = s->streams[stream_index];
                 uint8_t language[4];
-                url_fskip(pb, 12);
+                avio_skip(pb, 12);
                 avio_read(pb, language, 3);
                 if (language[0]) {
                     language[3] = 0;
@@ -874,7 +874,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
         } else if (!ff_guidcmp(g, timestamp_guid)) {
             int stream_index = ff_find_stream_index(s, sid);
             if (stream_index >= 0) {
-                url_fskip(pb, 8);
+                avio_skip(pb, 8);
                 wtv->pts = avio_rl64(pb);
                 consumed += 16;
                 if (wtv->pts == -1)
@@ -885,7 +885,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
                         wtv->epoch = wtv->pts;
                 if (mode == SEEK_TO_PTS && wtv->pts >= seekts) {
 #define WTV_PAD8(x) (((x) + 7) & ~7)
-                    url_fskip(pb, WTV_PAD8(len) - consumed);
+                    avio_skip(pb, WTV_PAD8(len) - consumed);
                     return 0;
                 }
                 }
@@ -923,7 +923,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
         } else
             av_log(s, AV_LOG_WARNING, "unsupported chunk:"PRI_GUID"\n", ARG_GUID(g));
 
-        url_fskip(pb, WTV_PAD8(len) - consumed);
+        avio_skip(pb, WTV_PAD8(len) - consumed);
     }
     return AVERROR_EOF;
 }
@@ -954,16 +954,16 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     wtv->last_valid_pts = AV_NOPTS_VALUE;
 
     /* read root directory sector */
-    url_fskip(s->pb, 0x30);
+    avio_skip(s->pb, 0x30);
     root_size = avio_rl32(s->pb);
     if (root_size > sizeof(root)) {
         av_log(s, AV_LOG_ERROR, "root directory size exceeds sector size\n");
         return AVERROR_INVALIDDATA;
     }
-    url_fskip(s->pb, 4);
+    avio_skip(s->pb, 4);
     root_sector = avio_rl32(s->pb);
 
-    url_fseek(s->pb, root_sector << WTV_SECTOR_BITS, SEEK_SET);
+    avio_seek(s->pb, root_sector << WTV_SECTOR_BITS, SEEK_SET);
     root_size = avio_read(s->pb, root, root_size);
     if (root_size < 0)
         return AVERROR_INVALIDDATA;
@@ -978,7 +978,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     ret = parse_chunks(s, SEEK_TO_DATA, 0, 0);
     if (ret < 0)
         return ret;
-    url_fseek(wtv->pb, -32, SEEK_CUR);
+    avio_seek(wtv->pb, -32, SEEK_CUR);
 
     timeline_pos = url_ftell(s->pb); // save before opening another file
 
@@ -1028,7 +1028,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
         }
     }
 
-    url_fseek(s->pb, timeline_pos, SEEK_SET);
+    avio_seek(s->pb, timeline_pos, SEEK_SET);
     return 0;
 }
 
@@ -1047,7 +1047,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
         return ret;
     pkt->stream_index = stream_index;
     pkt->pts          = wtv->pts;
-    url_fskip(pb, WTV_PAD8(len) - len);
+    avio_skip(pb, WTV_PAD8(len) - len);
     return 0;
 }
 
@@ -1072,9 +1072,9 @@ static int read_seek(AVFormatContext *s, int stream_index,
     i = ff_index_search_timestamp(wtv->index_entries, wtv->nb_index_entries, ts_relative, flags);
     if (i < 0) {
         if (wtv->last_valid_pts == AV_NOPTS_VALUE || ts < wtv->last_valid_pts)
-            url_fseek(pb, 0, SEEK_SET);
+            avio_seek(pb, 0, SEEK_SET);
         else if (st->duration != AV_NOPTS_VALUE && ts_relative > st->duration && wtv->nb_index_entries)
-            url_fseek(pb, wtv->index_entries[wtv->nb_index_entries - 1].pos, SEEK_SET);
+            avio_seek(pb, wtv->index_entries[wtv->nb_index_entries - 1].pos, SEEK_SET);
         if (parse_chunks(s, SEEK_TO_PTS, ts, 0) < 0)
             return AVERROR(ERANGE);
         return 0;
@@ -1083,7 +1083,7 @@ static int read_seek(AVFormatContext *s, int stream_index,
     if (wtv->epoch != AV_NOPTS_VALUE)
         wtv->pts += wtv->epoch;
     wtv->last_valid_pts = wtv->pts;
-    url_fseek(pb, wtv->index_entries[i].pos, SEEK_SET);
+    avio_seek(pb, wtv->index_entries[i].pos, SEEK_SET);
     return 0;
 }
 
diff --git a/libavformat/wv.c b/libavformat/wv.c
index fca35b8..5b3f33f 100644
--- a/libavformat/wv.c
+++ b/libavformat/wv.c
@@ -153,7 +153,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen
                     chmask = avio_rl32(pb);
                     break;
                 case 5:
-                    url_fskip(pb, 1);
+                    avio_skip(pb, 1);
                     chan |= (avio_r8(pb) & 0xF) << 8;
                     chmask = avio_rl24(pb);
                     break;
@@ -166,16 +166,16 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen
                 rate = avio_rl24(pb);
                 break;
             default:
-                url_fskip(pb, size);
+                avio_skip(pb, size);
             }
             if(id&0x40)
-                url_fskip(pb, 1);
+                avio_skip(pb, 1);
         }
         if(rate == -1){
             av_log(ctx, AV_LOG_ERROR, "Cannot determine custom sampling rate\n");
             return -1;
         }
-        url_fseek(pb, block_end - wc->blksize + 24, SEEK_SET);
+        avio_seek(pb, block_end - wc->blksize + 24, SEEK_SET);
     }
     if(!wc->bpp) wc->bpp = bpp;
     if(!wc->chan) wc->chan = chan;
@@ -228,7 +228,7 @@ static int wv_read_header(AVFormatContext *s,
         ff_ape_parse_tag(s);
         if(!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
             ff_id3v1_read(s);
-        url_fseek(s->pb, cur, SEEK_SET);
+        avio_seek(s->pb, cur, SEEK_SET);
     }
 
     return 0;
@@ -320,7 +320,7 @@ static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
     /* if found, seek there */
     if (index >= 0){
         wc->block_parsed = 1;
-        url_fseek(s->pb, st->index_entries[index].pos, SEEK_SET);
+        avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
         return 0;
     }
     /* if timestamp is out of bounds, return error */
@@ -331,7 +331,7 @@ static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
     do{
         ret = av_read_frame(s, pkt);
         if (ret < 0){
-            url_fseek(s->pb, pos, SEEK_SET);
+            avio_seek(s->pb, pos, SEEK_SET);
             return -1;
         }
         pts = pkt->pts;
diff --git a/libavformat/xa.c b/libavformat/xa.c
index 858a742..3b6a77f 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -76,9 +76,9 @@ static int xa_read_header(AVFormatContext *s,
 
     st->codec->codec_type   = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id     = CODEC_ID_ADPCM_EA_MAXIS_XA;
-    url_fskip(pb, 4);       /* Skip the XA ID */
+    avio_skip(pb, 4);       /* Skip the XA ID */
     xa->out_size            =  avio_rl32(pb);
-    url_fskip(pb, 2);       /* Skip the tag */
+    avio_skip(pb, 2);       /* Skip the tag */
     st->codec->channels     = avio_rl16(pb);
     st->codec->sample_rate  = avio_rl32(pb);
     /* Value in file is average byte rate*/
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 2e58cc6..1fdb0ca 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -81,7 +81,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap)
     video_dec->codec_type   = AVMEDIA_TYPE_VIDEO;
     video_dec->codec_id     = CODEC_ID_YOP;
 
-    url_fskip(pb, 6);
+    avio_skip(pb, 6);
 
     frame_rate              = avio_r8(pb);
     yop->frame_size         = avio_r8(pb) * 2048;
@@ -104,7 +104,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR_INVALIDDATA;
     }
 
-    url_fseek(pb, 2048, SEEK_SET);
+    avio_seek(pb, 2048, SEEK_SET);
 
     av_set_pts_info(video_stream, 32, 1, frame_rate);
 
@@ -153,7 +153,7 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt)
     // Set position to the start of the frame
     pkt->pos = yop->video_packet.pos;
 
-    url_fskip(pb, yop->audio_block_length - ret);
+    avio_skip(pb, yop->audio_block_length - ret);
 
     ret = avio_read(pb, yop->video_packet.data + yop->palette_size,
                      actual_video_data_size);
@@ -198,7 +198,7 @@ static int yop_read_seek(AVFormatContext *s, int stream_index,
     frame_pos      = timestamp * yop->frame_size + pos_min;
     yop->odd_frame = timestamp & 1;
 
-    url_fseek(s->pb, frame_pos, SEEK_SET);
+    avio_seek(s->pb, frame_pos, SEEK_SET);
     return 0;
 }
 
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list