summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2014-08-07 17:12:41 -0300
committerMichael Niedermayer <michaelni@gmx.at>2014-08-08 00:48:38 +0200
commitd34ec64a22907173c13e687b815d94618d2dc85b (patch)
treed53c26525699660773d9457d65ca980c21823351
parent5c3c67126feb046e25359096225507bf6dfe7b27 (diff)
downloadffmpeg-streaming-d34ec64a22907173c13e687b815d94618d2dc85b.zip
ffmpeg-streaming-d34ec64a22907173c13e687b815d94618d2dc85b.tar.gz
replace calls to url_feof() with avio_feof()
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffplay.c4
-rw-r--r--libavformat/4xm.c2
-rw-r--r--libavformat/adp.c2
-rw-r--r--libavformat/aiffdec.c2
-rw-r--r--libavformat/amr.c2
-rw-r--r--libavformat/anm.c2
-rw-r--r--libavformat/ape.c2
-rw-r--r--libavformat/aqtitledec.c2
-rw-r--r--libavformat/asfdec.c16
-rw-r--r--libavformat/astdec.c2
-rw-r--r--libavformat/avidec.c12
-rw-r--r--libavformat/bethsoftvid.c2
-rw-r--r--libavformat/bfi.c4
-rw-r--r--libavformat/bintext.c2
-rw-r--r--libavformat/bit.c2
-rw-r--r--libavformat/brstm.c4
-rw-r--r--libavformat/cafdec.c6
-rw-r--r--libavformat/cdxl.c2
-rw-r--r--libavformat/dauddec.c2
-rw-r--r--libavformat/dsicin.c2
-rw-r--r--libavformat/dtshddec.c2
-rw-r--r--libavformat/dv.c2
-rw-r--r--libavformat/dxa.c4
-rw-r--r--libavformat/electronicarts.c4
-rw-r--r--libavformat/ffmdec.c4
-rw-r--r--libavformat/ffmetadec.c4
-rw-r--r--libavformat/filmstripdec.c2
-rw-r--r--libavformat/flacdec.c2
-rw-r--r--libavformat/flvdec.c2
-rw-r--r--libavformat/gifdec.c6
-rw-r--r--libavformat/gxf.c4
-rw-r--r--libavformat/hls.c4
-rw-r--r--libavformat/hlsproto.c2
-rw-r--r--libavformat/idcin.c2
-rw-r--r--libavformat/idroqdec.c2
-rw-r--r--libavformat/iff.c2
-rw-r--r--libavformat/img2dec.c2
-rw-r--r--libavformat/ipmovie.c6
-rw-r--r--libavformat/jacosubdec.c2
-rw-r--r--libavformat/jvdec.c2
-rw-r--r--libavformat/lrcdec.c4
-rw-r--r--libavformat/lvfdec.c4
-rw-r--r--libavformat/lxfdec.c2
-rw-r--r--libavformat/matroskadec.c4
-rw-r--r--libavformat/mgsts.c2
-rw-r--r--libavformat/microdvddec.c2
-rw-r--r--libavformat/mlvdec.c2
-rw-r--r--libavformat/mmf.c2
-rw-r--r--libavformat/mov.c6
-rw-r--r--libavformat/mpc8.c4
-rw-r--r--libavformat/mpeg.c6
-rw-r--r--libavformat/mpegts.c2
-rw-r--r--libavformat/mpl2dec.c2
-rw-r--r--libavformat/mpsubdec.c2
-rw-r--r--libavformat/msnwc_tcp.c4
-rw-r--r--libavformat/mxfdec.c8
-rw-r--r--libavformat/mxg.c2
-rw-r--r--libavformat/ncdec.c2
-rw-r--r--libavformat/nistspheredec.c2
-rw-r--r--libavformat/nsvdec.c12
-rw-r--r--libavformat/nutdec.c4
-rw-r--r--libavformat/nuv.c8
-rw-r--r--libavformat/oggdec.c2
-rw-r--r--libavformat/paf.c2
-rw-r--r--libavformat/pjsdec.c2
-rw-r--r--libavformat/pmpdec.c4
-rw-r--r--libavformat/psxstr.c2
-rw-r--r--libavformat/qcp.c2
-rw-r--r--libavformat/realtextdec.c2
-rw-r--r--libavformat/redspark.c2
-rw-r--r--libavformat/riffdec.c2
-rw-r--r--libavformat/rmdec.c6
-rw-r--r--libavformat/rpl.c2
-rw-r--r--libavformat/rsd.c2
-rw-r--r--libavformat/samidec.c2
-rw-r--r--libavformat/smacker.c2
-rw-r--r--libavformat/smjpegdec.c4
-rw-r--r--libavformat/smush.c4
-rw-r--r--libavformat/sol.c2
-rw-r--r--libavformat/spdifdec.c2
-rw-r--r--libavformat/srtdec.c2
-rw-r--r--libavformat/subviewer1dec.c2
-rw-r--r--libavformat/subviewerdec.c2
-rw-r--r--libavformat/swfdec.c2
-rw-r--r--libavformat/takdec.c2
-rw-r--r--libavformat/tmv.c2
-rw-r--r--libavformat/tty.c2
-rw-r--r--libavformat/txd.c2
-rw-r--r--libavformat/vc1test.c2
-rw-r--r--libavformat/vivo.c6
-rw-r--r--libavformat/vplayerdec.c2
-rw-r--r--libavformat/vqf.c2
-rw-r--r--libavformat/wavdec.c10
-rw-r--r--libavformat/wc3movie.c4
-rw-r--r--libavformat/wtvdec.c10
-rw-r--r--libavformat/wvdec.c2
96 files changed, 160 insertions, 160 deletions
diff --git a/ffplay.c b/ffplay.c
index af0e199..e1e4ccc 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2824,7 +2824,7 @@ static int read_thread(void *arg)
av_freep(&opts);
if (ic->pb)
- ic->pb->eof_reached = 0; // FIXME hack, ffplay maybe should not use url_feof() to test for the end
+ ic->pb->eof_reached = 0; // FIXME hack, ffplay maybe should not use avio_feof() to test for the end
if (seek_by_bytes < 0)
seek_by_bytes = !!(ic->iformat->flags & AVFMT_TS_DISCONT) && strcmp("ogg", ic->iformat->name);
@@ -3013,7 +3013,7 @@ static int read_thread(void *arg)
}
ret = av_read_frame(ic, pkt);
if (ret < 0) {
- if (ret == AVERROR_EOF || url_feof(ic->pb))
+ if (ret == AVERROR_EOF || avio_feof(ic->pb))
eof = 1;
if (ic->pb && ic->pb->error)
break;
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 0b4ddfa..daf389d 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -293,7 +293,7 @@ static int fourxm_read_packet(AVFormatContext *s,
return ret;
fourcc_tag = AV_RL32(&header[0]);
size = AV_RL32(&header[4]);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
switch (fourcc_tag) {
case LIST_TAG:
diff --git a/libavformat/adp.c b/libavformat/adp.c
index 08a4225..8a3661a 100644
--- a/libavformat/adp.c
+++ b/libavformat/adp.c
@@ -71,7 +71,7 @@ static int adp_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret, size = 1024;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
ret = av_get_packet(s->pb, pkt, size);
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 7accec4..91ef2a4 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -58,7 +58,7 @@ static int get_tag(AVIOContext *pb, uint32_t * tag)
{
int size;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
*tag = avio_rl32(pb);
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 24d5ce0..8f44de1 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -117,7 +117,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pos = avio_tell(s->pb);
AMRContext *amr = s->priv_data;
- if (url_feof(s->pb)) {
+ if (avio_feof(s->pb)) {
return AVERROR(EIO);
}
diff --git a/libavformat/anm.c b/libavformat/anm.c
index 1c58575..5196cb8 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -175,7 +175,7 @@ static int read_packet(AVFormatContext *s,
Page *p;
int tmp, record_size;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR(EIO);
if (anm->page < 0)
diff --git a/libavformat/ape.c b/libavformat/ape.c
index d5a786a..fafc1df 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -389,7 +389,7 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt)
APEContext *ape = s->priv_data;
uint32_t extra_size = 8;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
if (ape->currentframe >= ape->totalframes)
return AVERROR_EOF;
diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c
index 810f95b..9508766 100644
--- a/libavformat/aqtitledec.c
+++ b/libavformat/aqtitledec.c
@@ -61,7 +61,7 @@ static int aqt_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = AV_CODEC_ID_TEXT;
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[4096];
int len = ff_get_line(s->pb, line, sizeof(line));
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 978b956..5fc293e 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -785,7 +785,7 @@ static int asf_read_header(AVFormatContext *s)
continue;
} else if (!ff_guidcmp(&g, &ff_asf_marker_header)) {
asf_read_marker(s, gsize);
- } else if (url_feof(pb)) {
+ } else if (avio_feof(pb)) {
return AVERROR_EOF;
} else {
if (!s->keylen) {
@@ -822,7 +822,7 @@ static int asf_read_header(AVFormatContext *s)
avio_rl64(pb);
avio_r8(pb);
avio_r8(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
asf->data_offset = avio_tell(pb);
asf->packet_size_left = 0;
@@ -922,20 +922,20 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
* the stream. */
if (pb->error == AVERROR(EAGAIN))
return AVERROR(EAGAIN);
- if (!url_feof(pb))
+ if (!avio_feof(pb))
av_log(s, AV_LOG_ERROR,
"ff asf bad header %x at:%"PRId64"\n", c, avio_tell(pb));
}
if ((c & 0x8f) == 0x82) {
if (d || e) {
- if (!url_feof(pb))
+ if (!avio_feof(pb))
av_log(s, AV_LOG_ERROR, "ff asf bad non zero\n");
return AVERROR_INVALIDDATA;
}
c = avio_r8(pb);
d = avio_r8(pb);
rsize += 3;
- } else if(!url_feof(pb)) {
+ } else if(!avio_feof(pb)) {
avio_seek(pb, -1, SEEK_CUR); // FIXME
}
@@ -1126,7 +1126,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
ASFStream *asf_st = 0;
for (;;) {
int ret;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
if (asf->packet_size_left < FRAME_HEADER_SIZE ||
asf->packet_segments < 1 && asf->packet_time_start == 0) {
@@ -1494,7 +1494,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index)
* skip them until the simple index object is reached */
while (ff_guidcmp(&g, &ff_asf_simple_index_header)) {
int64_t gsize = avio_rl64(s->pb);
- if (gsize < 24 || url_feof(s->pb)) {
+ if (gsize < 24 || avio_feof(s->pb)) {
goto end;
}
avio_skip(s->pb, gsize - 24);
@@ -1532,7 +1532,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index)
asf->index_read = ict > 1;
}
end:
-// if (url_feof(s->pb)) {
+// if (avio_feof(s->pb)) {
// ret = 0;
// }
avio_seek(s->pb, current_pos, SEEK_SET);
diff --git a/libavformat/astdec.c b/libavformat/astdec.c
index 3fa26dc..92c208d 100644
--- a/libavformat/astdec.c
+++ b/libavformat/astdec.c
@@ -84,7 +84,7 @@ static int ast_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pos;
int ret;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
pos = avio_tell(s->pb);
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 8c70649..5b260e2 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -219,7 +219,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
#ifdef DEBUG_SEEK
av_log(s, AV_LOG_ERROR, "pos:%"PRId64", len:%X\n", pos, len);
#endif
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_INVALIDDATA;
if (last_pos == pos || pos == base - 8)
@@ -237,7 +237,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
avio_rl32(pb); /* size */
duration = avio_rl32(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_INVALIDDATA;
pos = avio_tell(pb);
@@ -492,7 +492,7 @@ static int avi_read_header(AVFormatContext *s)
codec_type = -1;
frame_period = 0;
for (;;) {
- if (url_feof(pb))
+ if (avio_feof(pb))
goto fail;
tag = avio_rl32(pb);
size = avio_rl32(pb);
@@ -1111,7 +1111,7 @@ static int avi_sync(AVFormatContext *s, int exit_early)
start_sync:
memset(d, -1, sizeof(d));
- for (i = sync = avio_tell(pb); !url_feof(pb); i++) {
+ for (i = sync = avio_tell(pb); !avio_feof(pb); i++) {
int j;
for (j = 0; j < 7; j++)
@@ -1506,7 +1506,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
/* Read the entries and sort them in each stream component. */
for (i = 0; i < nb_index_entries; i++) {
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
tag = avio_rl32(pb);
@@ -1662,7 +1662,7 @@ static int avi_load_index(AVFormatContext *s)
for (;;) {
tag = avio_rl32(pb);
size = avio_rl32(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
break;
next = avio_tell(pb) + size + (size & 1);
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 6b84b79..c98ff14 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -213,7 +213,7 @@ static int vid_read_packet(AVFormatContext *s,
int audio_length;
int ret_value;
- if(vid->is_finished || url_feof(pb))
+ if(vid->is_finished || avio_feof(pb))
return AVERROR_EOF;
block_type = avio_r8(pb);
diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index b65a582..cc7f494 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -116,7 +116,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt)
BFIContext *bfi = s->priv_data;
AVIOContext *pb = s->pb;
int ret, audio_offset, video_offset, chunk_size, audio_size = 0;
- if (bfi->nframes == 0 || url_feof(pb)) {
+ if (bfi->nframes == 0 || avio_feof(pb)) {
return AVERROR_EOF;
}
@@ -124,7 +124,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt)
if (!bfi->avflag) {
uint32_t state = 0;
while(state != MKTAG('S','A','V','I')){
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
state = 256*state + avio_r8(pb);
}
diff --git a/libavformat/bintext.c b/libavformat/bintext.c
index d50a8d9..217ea49 100644
--- a/libavformat/bintext.c
+++ b/libavformat/bintext.c
@@ -310,7 +310,7 @@ static int read_packet(AVFormatContext *s,
return AVERROR(EIO);
bin->fsize = -1; /* done */
} else if (!bin->fsize) {
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR(EIO);
if (av_get_packet(s->pb, pkt, bin->chars_per_frame) < 0)
return AVERROR(EIO);
diff --git a/libavformat/bit.c b/libavformat/bit.c
index 0be471a..7b807b9 100644
--- a/libavformat/bit.c
+++ b/libavformat/bit.c
@@ -76,7 +76,7 @@ static int read_packet(AVFormatContext *s,
int i, j, ret;
int64_t pos= avio_tell(pb);
- if(url_feof(pb))
+ if(avio_feof(pb))
return AVERROR_EOF;
avio_rl16(pb); // sync word
diff --git a/libavformat/brstm.c b/libavformat/brstm.c
index 8e4dae6..19a4a2a 100644
--- a/libavformat/brstm.c
+++ b/libavformat/brstm.c
@@ -181,7 +181,7 @@ static int read_header(AVFormatContext *s)
}
avio_skip(s->pb, size - (avio_tell(s->pb) - pos));
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
chunk = avio_rl32(s->pb);
size = avio_rb32(s->pb);
if (size < 8) {
@@ -244,7 +244,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
uint32_t samples, size;
int ret;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
b->current_block++;
if (b->current_block == b->block_count) {
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index a8edbca..c797e20 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -241,7 +241,7 @@ static int read_header(AVFormatContext *s)
/* parse each chunk */
found_data = 0;
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
/* stop at data chunk if seeking is not supported or
data chunk size is unknown */
@@ -251,7 +251,7 @@ static int read_header(AVFormatContext *s)
tag = avio_rb32(pb);
size = avio_rb64(pb);
pos = avio_tell(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
break;
switch (tag) {
@@ -339,7 +339,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
int res, pkt_size = 0, pkt_frames = 0;
int64_t left = CAF_MAX_PKT_SIZE;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
/* don't read past end of data chunk */
diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c
index ab8a846..e3e379a 100644
--- a/libavformat/cdxl.c
+++ b/libavformat/cdxl.c
@@ -110,7 +110,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pos;
int ret;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
pos = avio_tell(pb);
diff --git a/libavformat/dauddec.c b/libavformat/dauddec.c
index 30d1200..f6e7491 100644
--- a/libavformat/dauddec.c
+++ b/libavformat/dauddec.c
@@ -41,7 +41,7 @@ static int daud_header(AVFormatContext *s) {
static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
AVIOContext *pb = s->pb;
int ret, size;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
size = avio_rb16(pb);
avio_rb16(pb); // unknown
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index 4a54680..4b5a934 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -150,7 +150,7 @@ static int cin_read_frame_header(CinDemuxContext *cin, AVIOContext *pb) {
hdr->video_frame_size = avio_rl32(pb);
hdr->audio_frame_size = avio_rl32(pb);
- if (url_feof(pb) || pb->error)
+ if (avio_feof(pb) || pb->error)
return AVERROR(EIO);
if (avio_rl32(pb) != 0xAA55AA55)
diff --git a/libavformat/dtshddec.c b/libavformat/dtshddec.c
index 55c4ca6..0fd0304 100644
--- a/libavformat/dtshddec.c
+++ b/libavformat/dtshddec.c
@@ -64,7 +64,7 @@ static int dtshd_read_header(AVFormatContext *s)
st->codec->codec_id = AV_CODEC_ID_DTS;
st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
chunk_type = avio_rb64(pb);
chunk_size = avio_rb64(pb);
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 1e15c08..1030d51 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -504,7 +504,7 @@ static int dv_read_header(AVFormatContext *s)
state = avio_rb32(s->pb);
while ((state & 0xffffff7f) != 0x1f07003f) {
- if (url_feof(s->pb)) {
+ if (avio_feof(s->pb)) {
av_log(s, AV_LOG_ERROR, "Cannot find DV header.\n");
return -1;
}
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index ea5b4f7..6ad1c9f 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -112,7 +112,7 @@ static int dxa_read_header(AVFormatContext *s)
if (ast->codec->sample_rate > 0)
avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
// find 'data' chunk
- while(avio_tell(pb) < c->vidpos && !url_feof(pb)){
+ while(avio_tell(pb) < c->vidpos && !avio_feof(pb)){
tag = avio_rl32(pb);
fsize = avio_rl32(pb);
if(tag == MKTAG('d', 'a', 't', 'a')) break;
@@ -170,7 +170,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}
avio_seek(s->pb, c->vidpos, SEEK_SET);
- while(!url_feof(s->pb) && c->frames){
+ while(!avio_feof(s->pb) && c->frames){
if ((ret = avio_read(s->pb, buf, 4)) != 4) {
av_log(s, AV_LOG_ERROR, "failed reading chunk type\n");
return ret < 0 ? ret : AVERROR_INVALIDDATA;
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 1acaa14..515b70f 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -109,7 +109,7 @@ static int process_audio_header_elements(AVFormatContext *s)
ea->sample_rate = -1;
ea->num_channels = 1;
- while (!url_feof(pb) && in_header) {
+ while (!avio_feof(pb) && in_header) {
int in_subheader;
uint8_t byte;
byte = avio_r8(pb);
@@ -118,7 +118,7 @@ static int process_audio_header_elements(AVFormatContext *s)
case 0xFD:
av_log(s, AV_LOG_DEBUG, "entered audio subheader\n");
in_subheader = 1;
- while (!url_feof(pb) && in_subheader) {
+ while (!avio_feof(pb) && in_subheader) {
uint8_t subbyte;
subbyte = avio_r8(pb);
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index d296ca7..f8fee2f 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -63,7 +63,7 @@ static int ffm_resync(AVFormatContext *s, int state)
{
av_log(s, AV_LOG_ERROR, "resyncing\n");
while (state != PACKET_ID) {
- if (url_feof(s->pb)) {
+ if (avio_feof(s->pb)) {
av_log(s, AV_LOG_ERROR, "cannot find FFM syncword\n");
return -1;
}
@@ -250,7 +250,7 @@ static int ffm2_read_header(AVFormatContext *s)
ffm->file_size = (UINT64_C(1) << 63) - 1;
}
- while(!url_feof(pb)) {
+ while(!avio_feof(pb)) {
unsigned id = avio_rb32(pb);
unsigned size = avio_rb32(pb);
int64_t next = avio_tell(pb) + size;
diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c
index 19c14e4..e4e9dda 100644
--- a/libavformat/ffmetadec.c
+++ b/libavformat/ffmetadec.c
@@ -50,7 +50,7 @@ static void get_line(AVIOContext *s, uint8_t *buf, int size)
buf[i++] = c;
}
buf[i] = 0;
- } while (!url_feof(s) && (buf[0] == ';' || buf[0] == '#' || buf[0] == 0));
+ } while (!avio_feof(s) && (buf[0] == ';' || buf[0] == '#' || buf[0] == 0));
}
static AVChapter *read_chapter(AVFormatContext *s)
@@ -128,7 +128,7 @@ static int read_header(AVFormatContext *s)
AVDictionary **m = &s->metadata;
uint8_t line[1024];
- while(!url_feof(s->pb)) {
+ while(!avio_feof(s->pb)) {
get_line(s->pb, line, sizeof(line));
if (!memcmp(line, ID_STREAM, strlen(ID_STREAM))) {
diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c
index 1cd1a48..abc5f66 100644
--- a/libavformat/filmstripdec.c
+++ b/libavformat/filmstripdec.c
@@ -80,7 +80,7 @@ static int read_packet(AVFormatContext *s,
FilmstripDemuxContext *film = s->priv_data;
AVStream *st = s->streams[0];
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR(EIO);
pkt->dts = avio_tell(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);
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index d601c75..c4f9d86 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -49,7 +49,7 @@ static int flac_read_header(AVFormatContext *s)
}
/* process metadata blocks */
- while (!url_feof(s->pb) && !metadata_last) {
+ while (!avio_feof(s->pb) && !metadata_last) {
avio_read(s->pb, header, 4);
flac_parse_block_header(header, &metadata_last, &metadata_type,
&metadata_size);
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 72833de..4dc341b 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -779,7 +779,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
dts = avio_rb24(s->pb);
dts |= avio_r8(s->pb) << 24;
av_dlog(s, "type:%d, size:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, dts, avio_tell(s->pb));
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
avio_skip(s->pb, 3); /* stream id, always 0 */
flags = 0;
diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c
index 2981bca..7db5a27 100644
--- a/libavformat/gifdec.c
+++ b/libavformat/gifdec.c
@@ -84,7 +84,7 @@ static int resync(AVIOContext *pb)
int b = avio_r8(pb);
if (b != gif87a_sig[i] && b != gif89a_sig[i])
i = -(b != 'G');
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
}
return 0;
@@ -234,7 +234,7 @@ parse_keyframe:
ret = AVERROR_EOF;
}
- while (GIF_TRAILER != (block_label = avio_r8(pb)) && !url_feof(pb)) {
+ while (GIF_TRAILER != (block_label = avio_r8(pb)) && !avio_feof(pb)) {
if (block_label == GIF_EXTENSION_INTRODUCER) {
if ((ret = gif_read_ext (s)) < 0 )
goto resync;
@@ -299,7 +299,7 @@ resync:
if ((ret >= 0 && !frame_parsed) || ret == AVERROR_EOF) {
/* This might happen when there is no image block
* between extension blocks and GIF_TRAILER or EOF */
- if (!gdc->ignore_loop && (block_label == GIF_TRAILER || url_feof(pb))
+ if (!gdc->ignore_loop && (block_label == GIF_TRAILER || avio_feof(pb))
&& (gdc->total_iter < 0 || ++gdc->iter_count < gdc->total_iter))
return avio_seek(pb, 0, SEEK_SET);
return AVERROR_EOF;
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index 479a8fb..6c624f0 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -442,7 +442,7 @@ static int gxf_header(AVFormatContext *s) {
#define READ_ONE() \
{ \
- if (!max_interval-- || url_feof(pb)) \
+ if (!max_interval-- || avio_feof(pb)) \
goto out; \
tmp = tmp << 8 | avio_r8(pb); \
}
@@ -504,7 +504,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
int field_nr, field_info, skip = 0;
int stream_index;
if (!parse_packet_header(pb, &pkt_type, &pkt_len)) {
- if (!url_feof(pb))
+ if (!avio_feof(pb))
av_log(s, AV_LOG_ERROR, "sync lost\n");
return -1;
}
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 3897723..2ea62c6 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -541,7 +541,7 @@ static int parse_playlist(HLSContext *c, const char *url,
pls->finished = 0;
pls->type = PLS_TYPE_UNSPECIFIED;
}
- while (!url_feof(in)) {
+ while (!avio_feof(in)) {
read_chomp_line(in, line, sizeof(line));
if (av_strstart(line, "#EXT-X-STREAM-INF:", &ptr)) {
is_variant = 1;
@@ -1532,7 +1532,7 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt)
AVRational tb;
ret = av_read_frame(pls->ctx, &pls->pkt);
if (ret < 0) {
- if (!url_feof(&pls->pb) && ret != AVERROR_EOF)
+ if (!avio_feof(&pls->pb) && ret != AVERROR_EOF)
return ret;
reset_packet(&pls->pkt);
break;
diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index f6fcbe5..e607c10 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -126,7 +126,7 @@ static int parse_playlist(URLContext *h, const char *url)
free_segment_list(s);
s->finished = 0;
- while (!url_feof(in)) {
+ while (!avio_feof(in)) {
read_chomp_line(in, line, sizeof(line));
if (av_strstart(line, "#EXT-X-STREAM-INF:", &ptr)) {
struct variant_info info = {{0}};
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index cc25fb0..b2623e8 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -262,7 +262,7 @@ static int idcin_read_packet(AVFormatContext *s,
unsigned char palette_buffer[768];
uint32_t palette[256];
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return s->pb->error ? s->pb->error : AVERROR_EOF;
if (idcin->next_chunk_is_video) {
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index 8cdd72e..db678d6 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -106,7 +106,7 @@ static int roq_read_packet(AVFormatContext *s,
while (!packet_read) {
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR(EIO);
/* get the next chunk preamble */
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 2a06331..a46bc92 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -363,7 +363,7 @@ static int iff_read_header(AVFormatContext *s)
iff->maud_bits = -1;
iff->maud_compression = -1;
- while(!url_feof(pb)) {
+ while(!avio_feof(pb)) {
uint64_t orig_pos;
int res;
const char *metadata_tag = NULL;
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index cf51c0b..259f90b 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -419,7 +419,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
infer_size(&codec->width, &codec->height, size[0]);
} else {
f[0] = s1->pb;
- if (url_feof(f[0]))
+ if (avio_feof(f[0]))
return AVERROR(EIO);
if (s->frame_size > 0) {
size[0] = s->frame_size;
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 4a766ef..aa8f543 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -237,7 +237,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
return chunk_type;
/* read the next chunk, wherever the file happens to be pointing */
- if (url_feof(pb))
+ if (avio_feof(pb))
return CHUNK_EOF;
if (avio_read(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
CHUNK_PREAMBLE_SIZE)
@@ -283,7 +283,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
while ((chunk_size > 0) && (chunk_type != CHUNK_BAD)) {
/* read the next chunk, wherever the file happens to be pointing */
- if (url_feof(pb)) {
+ if (avio_feof(pb)) {
chunk_type = CHUNK_EOF;
break;
}
@@ -555,7 +555,7 @@ static int ipmovie_read_header(AVFormatContext *s)
while (memcmp(signature_buffer, signature, sizeof(signature))) {
memmove(signature_buffer, signature_buffer + 1, sizeof(signature_buffer) - 1);
signature_buffer[sizeof(signature_buffer) - 1] = avio_r8(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
}
/* initialize private context members */
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index e77ab40..9a28870 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -174,7 +174,7 @@ static int jacosub_read_header(AVFormatContext *s)
av_bprint_init(&header, 1024+FF_INPUT_BUFFER_PADDING_SIZE, 4096);
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
int cmd_len;
const char *p = line;
int64_t pos = avio_tell(pb);
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index eab450d..21eb14d 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -166,7 +166,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVIOContext *pb = s->pb;
AVStream *ast = s->streams[0];
- while (!url_feof(s->pb) && jv->pts < ast->nb_index_entries) {
+ while (!avio_feof(s->pb) && jv->pts < ast->nb_index_entries) {
const AVIndexEntry *e = ast->index_entries + jv->pts;
const JVFrame *jvf = jv->frames + jv->pts;
diff --git a/libavformat/lrcdec.c b/libavformat/lrcdec.c
index 3b02e34..df61853 100644
--- a/libavformat/lrcdec.c
+++ b/libavformat/lrcdec.c
@@ -104,7 +104,7 @@ static int64_t read_line(AVBPrint *buf, AVIOContext *pb)
int64_t pos = avio_tell(pb);
av_bprint_clear(buf);
- while(!url_feof(pb)) {
+ while(!avio_feof(pb)) {
int c = avio_r8(pb);
if(c != '\r') {
av_bprint_chars(buf, c, 1);
@@ -169,7 +169,7 @@ static int lrc_read_header(AVFormatContext *s)
st->codec->codec_id = AV_CODEC_ID_TEXT;
av_bprint_init(&line, 0, AV_BPRINT_SIZE_UNLIMITED);
- while(!url_feof(s->pb)) {
+ while(!avio_feof(s->pb)) {
int64_t pos = read_line(&line, s->pb);
int64_t header_offset = find_header(line.str);
if(header_offset >= 0) {
diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c
index 1ff67c8..81aec59 100644
--- a/libavformat/lvfdec.c
+++ b/libavformat/lvfdec.c
@@ -51,7 +51,7 @@ static int lvf_read_header(AVFormatContext *s)
avio_skip(s->pb, 1012);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
id = avio_rl32(s->pb);
size = avio_rl32(s->pb);
next_offset = avio_tell(s->pb) + size;
@@ -108,7 +108,7 @@ static int lvf_read_packet(AVFormatContext *s, AVPacket *pkt)
int ret, is_video = 0;
pos = avio_tell(s->pb);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
id = avio_rl32(s->pb);
size = avio_rl32(s->pb);
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 19f7f27..11d6da5 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -92,7 +92,7 @@ static int sync(AVFormatContext *s, uint8_t *header)
return ret < 0 ? ret : AVERROR_EOF;
while (memcmp(buf, LXF_IDENT, LXF_IDENT_LENGTH)) {
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
memmove(buf, &buf[1], LXF_IDENT_LENGTH-1);
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 50b75e7..dbec9ee 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -654,7 +654,7 @@ static int matroska_resync(MatroskaDemuxContext *matroska, int64_t last_pos)
id = avio_rb32(pb);
// try to find a toplevel element
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
if (id == MATROSKA_ID_INFO || id == MATROSKA_ID_TRACKS ||
id == MATROSKA_ID_CUES || id == MATROSKA_ID_TAGS ||
id == MATROSKA_ID_SEEKHEAD || id == MATROSKA_ID_ATTACHMENTS ||
@@ -707,7 +707,7 @@ static int ebml_read_num(MatroskaDemuxContext *matroska, AVIOContext *pb,
* use it safely here to catch EOS. */
if (!(total = avio_r8(pb))) {
/* we might encounter EOS here */
- if (!url_feof(pb)) {
+ if (!avio_feof(pb)) {
int64_t pos = avio_tell(pb);
av_log(matroska->ctx, AV_LOG_ERROR,
"Read error at pos. %"PRIu64" (0x%"PRIx64")\n",
diff --git a/libavformat/mgsts.c b/libavformat/mgsts.c
index dec6bfc..8cbc952 100644
--- a/libavformat/mgsts.c
+++ b/libavformat/mgsts.c
@@ -74,7 +74,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
uint32_t chunk_size, payload_size;
int ret;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
avio_skip(pb, 4);
diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c
index 49d2b68..ce3433c 100644
--- a/libavformat/microdvddec.c
+++ b/libavformat/microdvddec.c
@@ -88,7 +88,7 @@ static int microdvd_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char *p;
AVPacket *sub;
int64_t pos = avio_tell(s->pb);
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index a980ed6..0ed1bfa 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -126,7 +126,7 @@ static int scan_file(AVFormatContext *avctx, AVStream *vst, AVStream *ast, int f
MlvContext *mlv = avctx->priv_data;
AVIOContext *pb = mlv->pb[file];
int ret;
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
int type;
unsigned int size;
type = avio_rl32(pb);
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index a023dd6..f557eeb 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -286,7 +286,7 @@ static int mmf_read_packet(AVFormatContext *s, AVPacket *pkt)
left = mmf->data_end - avio_tell(s->pb);
size = FFMIN(left, MAX_SIZE);
- if (url_feof(s->pb) || size <= 0)
+ if (avio_feof(s->pb) || size <= 0)
return AVERROR_EOF;
ret = av_get_packet(s->pb, pkt, size);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6c6d266..ec554c6 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -485,7 +485,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_skip(pb, 16);
for (type = 0; type != -1 && avio_tell(pb) < next; ) {
- if(url_feof(pb))
+ if(avio_feof(pb))
return AVERROR_EOF;
type = avio_rb16(pb);
len = avio_rb16(pb);
@@ -3173,7 +3173,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (atom.size < 0)
atom.size = INT64_MAX;
- while (total_size + 8 <= atom.size && !url_feof(pb)) {
+ while (total_size + 8 <= atom.size && !avio_feof(pb)) {
int (*parse)(MOVContext*, AVIOContext*, MOVAtom) = NULL;
a.size = atom.size;
a.type=0;
@@ -3721,7 +3721,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
avio_seek(s->pb, mov->next_root_atom, SEEK_SET);
mov->next_root_atom = 0;
if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||
- url_feof(s->pb))
+ avio_feof(s->pb))
return AVERROR_EOF;
av_dlog(s, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb));
goto retry;
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index b32bc9c..a15dc25 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -220,7 +220,7 @@ static int mpc8_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
}
- while(!url_feof(pb)){
+ while(!avio_feof(pb)){
pos = avio_tell(pb);
mpc8_get_chunk_header(pb, &tag, &size);
if(tag == TAG_STREAMHDR)
@@ -275,7 +275,7 @@ static int mpc8_read_packet(AVFormatContext *s, AVPacket *pkt)
int tag;
int64_t pos, size;
- while(!url_feof(s->pb)){
+ while(!avio_feof(s->pb)){
pos = avio_tell(s->pb);
/* don't return bogus packets with the ape tag data */
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index c53bab3..056db2e 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -168,7 +168,7 @@ static int find_next_start_code(AVIOContext *pb, int *size_ptr,
state = *header_state;
n = *size_ptr;
while (n > 0) {
- if (url_feof(pb))
+ if (avio_feof(pb))
break;
v = avio_r8(pb);
n--;
@@ -246,7 +246,7 @@ redo:
startcode = find_next_start_code(s->pb, &size, &m->header_state);
last_sync = avio_tell(s->pb);
if (startcode < 0) {
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
// FIXME we should remember header_state
return AVERROR(EAGAIN);
@@ -702,7 +702,7 @@ static int vobsub_read_header(AVFormatContext *s)
}
av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[MAX_LINE_SIZE];
int len = ff_get_line(s->pb, line, sizeof(line));
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 2b18695..a2456a3 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2192,7 +2192,7 @@ static int mpegts_resync(AVFormatContext *s)
for (i = 0; i < MAX_RESYNC_SIZE; i++) {
c = avio_r8(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
if (c == 0x47) {
avio_seek(pb, -1, SEEK_CUR);
diff --git a/libavformat/mpl2dec.c b/libavformat/mpl2dec.c
index 17b302d..260b7be 100644
--- a/libavformat/mpl2dec.c
+++ b/libavformat/mpl2dec.c
@@ -83,7 +83,7 @@ static int mpl2_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = AV_CODEC_ID_MPL2;
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[4096];
char *p = line;
const int64_t pos = avio_tell(s->pb);
diff --git a/libavformat/mpsubdec.c b/libavformat/mpsubdec.c
index c5bdcdb..eddc594 100644
--- a/libavformat/mpsubdec.c
+++ b/libavformat/mpsubdec.c
@@ -63,7 +63,7 @@ static int mpsub_read_header(AVFormatContext *s)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[1024];
float start, duration;
int fps, len = ff_get_line(s->pb, line, sizeof(line));
diff --git a/libavformat/msnwc_tcp.c b/libavformat/msnwc_tcp.c
index 0ac1c30..60225af 100644
--- a/libavformat/msnwc_tcp.c
+++ b/libavformat/msnwc_tcp.c
@@ -89,9 +89,9 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx)
/* Some files start with "connected\r\n\r\n".
* So skip until we find the first byte of struct size */
- while(avio_r8(pb) != HEADER_SIZE && !url_feof(pb));
+ while(avio_r8(pb) != HEADER_SIZE && !avio_feof(pb));
- if(url_feof(pb)) {
+ if(avio_feof(pb)) {
av_log(ctx, AV_LOG_ERROR, "Could not find valid start.\n");
return -1;
}
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 467d184..2fc1ce0 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -284,7 +284,7 @@ static int64_t klv_decode_ber_length(AVIOContext *pb)
static int mxf_read_sync(AVIOContext *pb, const uint8_t *key, unsigned size)
{
int i, b;
- for (i = 0; i < size && !url_feof(pb); i++) {
+ for (i = 0; i < size && !avio_feof(pb); i++) {
b = avio_r8(pb);
if (b == key[0])
i = 0;
@@ -1874,7 +1874,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
if (!ctx)
return AVERROR(ENOMEM);
- while (avio_tell(pb) + 4 < klv_end && !url_feof(pb)) {
+ while (avio_tell(pb) + 4 < klv_end && !avio_feof(pb)) {
int ret;
int tag = avio_rb16(pb);
int size = avio_rb16(pb); /* KLV specified by 0x53 */
@@ -2122,7 +2122,7 @@ static int mxf_read_header(AVFormatContext *s)
mxf_read_random_index_pack(s);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
const MXFMetadataReadTableEntry *metadata;
if (avio_tell(s->pb) == last_pos) {
av_log(mxf->fc, AV_LOG_ERROR, "MXF structure loop detected\n");
@@ -2450,7 +2450,7 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
skip:
avio_skip(s->pb, klv.length);
}
- return url_feof(s->pb) ? AVERROR_EOF : ret;
+ return avio_feof(s->pb) ? AVERROR_EOF : ret;
}
static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index b2b5b86..34977b8 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -136,7 +136,7 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
uint8_t *startmarker_ptr, *end, *search_end, marker;
MXGContext *mxg = s->priv_data;
- while (!url_feof(s->pb) && !s->pb->error){
+ while (!avio_feof(s->pb) && !s->pb->error){
if (mxg->cache_size <= OVERREAD_SIZE) {
/* update internal buffer */
ret = mxg_update_cache(s, DEFAULT_PACKET_SIZE + OVERREAD_SIZE);
diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c
index 8cb7ed4..062899f 100644
--- a/libavformat/ncdec.c
+++ b/libavformat/ncdec.c
@@ -67,7 +67,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
uint32_t state=-1;
while (state != NC_VIDEO_FLAG) {
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR(EIO);
state = (state<<8) + avio_r8(s->pb);
}
diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c
index 2c96686..2f17f9e 100644
--- a/libavformat/nistspheredec.c
+++ b/libavformat/nistspheredec.c
@@ -51,7 +51,7 @@ static int nist_read_header(AVFormatContext *s)
if (header_size <= 0)
return AVERROR_INVALIDDATA;
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
ff_get_line(s->pb, buffer, sizeof(buffer));
if (avio_tell(s->pb) >= header_size)
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index e1fcfee..926e88e 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -232,7 +232,7 @@ static int nsv_resync(AVFormatContext *s)
//nsv->state = NSV_UNSYNC;
for (i = 0; i < NSV_MAX_RESYNC; i++) {
- if (url_feof(pb)) {
+ if (avio_feof(pb)) {
av_dlog(s, "NSV EOF\n");
nsv->state = NSV_UNSYNC;
return -1;
@@ -299,7 +299,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
table_entries_used = avio_rl32(pb);
av_dlog(s, "NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
strings_size, table_entries, table_entries_used);
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
av_dlog(s, "NSV got header; filepos %"PRId64"\n", avio_tell(pb));
@@ -336,7 +336,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
}
av_free(strings);
}
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
av_dlog(s, "NSV got infos; filepos %"PRId64"\n", avio_tell(pb));
@@ -368,7 +368,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
avio_seek(pb, nsv->base_offset + size, SEEK_SET); /* required for dumbdriving-271.nsv (2 extra bytes) */
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
nsv->state = NSV_HAS_READ_NSVF;
return 0;
@@ -546,7 +546,7 @@ static int nsv_read_chunk(AVFormatContext *s, int fill_header)
return 0; //-1; /* hey! eat what you've in your plate first! */
null_chunk_retry:
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
for (i = 0; i < NSV_MAX_RESYNC_TRIES && nsv->state < NSV_FOUND_NSVS && !err; i++)
@@ -581,7 +581,7 @@ null_chunk_retry:
vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming braindead */
}
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
if (!vsize && !asize) {
nsv->state = NSV_UNSYNC;
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 8a4fe4c..c4ab409 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -146,7 +146,7 @@ static uint64_t find_any_startcode(AVIOContext *bc, int64_t pos)
/* 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);
- while (!url_feof(bc)) {
+ while (!avio_feof(bc)) {
state = (state << 8) | avio_r8(bc);
if ((state >> 56) != 'N')
continue;
@@ -1056,7 +1056,7 @@ static int nut_read_packet(AVFormatContext *s, AVPacket *pkt)
pos -= 8;
} else {
frame_code = avio_r8(bc);
- if (url_feof(bc))
+ if (avio_feof(bc))
return AVERROR_EOF;
if (frame_code == 'N') {
tmp = frame_code;
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 2c02de1..e7f0eea 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -72,7 +72,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
if (!vst && !myth)
return 1; // no codec data needed
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
int size, subtype;
frametype = avio_r8(pb);
@@ -236,7 +236,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt)
nuv_frametype frametype;
int ret, size;
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0;
uint64_t pos = avio_tell(pb);
@@ -309,7 +309,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt)
static int nuv_resync(AVFormatContext *s, int64_t pos_limit) {
AVIOContext *pb = s->pb;
uint32_t tag = 0;
- while(!url_feof(pb) && avio_tell(pb) < pos_limit) {
+ while(!avio_feof(pb) && avio_tell(pb) < pos_limit) {
tag = (tag << 8) | avio_r8(pb);
if (tag == MKBETAG('R','T','j','j') &&
(tag = avio_rb32(pb)) == MKBETAG('j','j','j','j') &&
@@ -339,7 +339,7 @@ static int64_t nuv_read_dts(AVFormatContext *s, int stream_index,
if (!nuv_resync(s, pos_limit))
return AV_NOPTS_VALUE;
- while (!url_feof(pb) && avio_tell(pb) < pos_limit) {
+ while (!avio_feof(pb) && avio_tell(pb) < pos_limit) {
if (avio_read(pb, hdr, HDRSIZE) < HDRSIZE)
return AV_NOPTS_VALUE;
frametype = hdr[0];
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index f7d00c1..dcead1c 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -331,7 +331,7 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
c = avio_r8(bc);
- if (url_feof(bc))
+ if (avio_feof(bc))
return AVERROR_EOF;
sync[sp++ & 3] = c;
diff --git a/libavformat/paf.c b/libavformat/paf.c
index 88a274f..618994c 100644
--- a/libavformat/paf.c
+++ b/libavformat/paf.c
@@ -199,7 +199,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if (p->current_frame >= p->nb_frames)
return AVERROR_EOF;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
if (p->got_audio) {
diff --git a/libavformat/pjsdec.c b/libavformat/pjsdec.c
index 6f5db37..5129b70 100644
--- a/libavformat/pjsdec.c
+++ b/libavformat/pjsdec.c
@@ -73,7 +73,7 @@ static int pjs_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = AV_CODEC_ID_PJS;
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[4096];
char *p = line;
const int64_t pos = avio_tell(s->pb);
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c
index d032837..ec966b3 100644
--- a/libavformat/pmpdec.c
+++ b/libavformat/pmpdec.c
@@ -97,7 +97,7 @@ static int pmp_header(AVFormatContext *s)
for (i = 0; i < index_cnt; i++) {
uint32_t size = avio_rl32(pb);
int flags = size & 1 ? AVINDEX_KEYFRAME : 0;
- if (url_feof(pb)) {
+ if (avio_feof(pb)) {
av_log(s, AV_LOG_FATAL, "Encountered EOF while reading index.\n");
return AVERROR_INVALIDDATA;
}
@@ -133,7 +133,7 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
int ret = 0;
int i;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
if (pmp->cur_stream == 0) {
int num_packets;
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 5efcadf..dc49170 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -292,7 +292,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
}
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
}
}
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 1ef86fe..4d42197 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -139,7 +139,7 @@ static int qcp_read_packet(AVFormatContext *s, AVPacket *pkt)
QCPContext *c = s->priv_data;
unsigned int chunk_size, tag;
- while(!url_feof(pb)) {
+ while(!avio_feof(pb)) {
if (c->data_size) {
int pkt_size, ret, mode = avio_r8(pb);
diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c
index 5e4981a..e1225d5 100644
--- a/libavformat/realtextdec.c
+++ b/libavformat/realtextdec.c
@@ -72,7 +72,7 @@ static int realtext_read_header(AVFormatContext *s)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
AVPacket *sub;
const int64_t pos = avio_tell(s->pb) - (c != 0);
int n = ff_smil_extract_next_chunk(s->pb, &buf, &c);
diff --git a/libavformat/redspark.c b/libavformat/redspark.c
index 6d4c8c5..13a7b37 100644
--- a/libavformat/redspark.c
+++ b/libavformat/redspark.c
@@ -143,7 +143,7 @@ static int redspark_read_packet(AVFormatContext *s, AVPacket *pkt)
uint32_t size = 8 * codec->channels;
int ret;
- if (url_feof(s->pb) || redspark->samples_count == s->streams[0]->duration)
+ if (avio_feof(s->pb) || redspark->samples_count == s->streams[0]->duration)
return AVERROR_EOF;
ret = av_get_packet(s->pb, pkt, size);
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 48c9a94..09fee9d 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -191,7 +191,7 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
chunk_code = avio_rl32(pb);
chunk_size = avio_rl32(pb);
- if (url_feof(pb)) {
+ if (avio_feof(pb)) {
if (chunk_code || chunk_size) {
av_log(s, AV_LOG_WARNING, "INFO subchunk truncated\n");
return AVERROR_INVALIDDATA;
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 36764ee..f53ab8c 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -494,7 +494,7 @@ static int rm_read_header(AVFormatContext *s)
avio_skip(pb, tag_size - 8);
for(;;) {
- if (url_feof(pb))
+ if (avio_feof(pb))
return -1;
tag = avio_rl32(pb);
tag_size = avio_rb32(pb);
@@ -601,7 +601,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
AVStream *st;
uint32_t state=0xFFFFFFFF;
- while(!url_feof(pb)){
+ while(!avio_feof(pb)){
int len, num, i;
*pos= avio_tell(pb) - 3;
if(rm->remaining_len > 0){
@@ -953,7 +953,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
st = s->streams[i];
}
- if(len<0 || url_feof(s->pb))
+ if(len<0 || avio_feof(s->pb))
return AVERROR(EIO);
res = ff_rm_parse_packet (s, s->pb, st, st->priv_data, len, pkt,
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index 46a5796..c1229e8 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -60,7 +60,7 @@ static int read_line(AVIOContext * pb, char* line, int bufsize)
break;
if (b == '\n') {
line[i] = '\0';
- return url_feof(pb) ? -1 : 0;
+ return avio_feof(pb) ? -1 : 0;
}
line[i] = b;
}
diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index b6f1686..bb2f3bc 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -137,7 +137,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecContext *codec = s->streams[0]->codec;
int ret, size = 1024;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
if (codec->codec_id == AV_CODEC_ID_ADPCM_IMA_RAD)
diff --git a/libavformat/samidec.c b/libavformat/samidec.c
index 2eaee6f..1a12eca 100644
--- a/libavformat/samidec.c
+++ b/libavformat/samidec.c
@@ -62,7 +62,7 @@ static int sami_read_header(AVFormatContext *s)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
av_bprint_init(&hdr_buf, 0, AV_BPRINT_SIZE_UNLIMITED);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
AVPacket *sub;
const int64_t pos = avio_tell(s->pb) - (c != 0);
int is_sync, n = ff_smil_extract_next_chunk(s->pb, &buf, &c);
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 46215ee..284cdc1 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -257,7 +257,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
int frame_size = 0;
int palchange = 0;
- if (url_feof(s->pb) || smk->cur_frame >= smk->frames)
+ if (avio_feof(s->pb) || smk->cur_frame >= smk->frames)
return AVERROR_EOF;
/* if we demuxed all streams, pass another frame */
diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c
index e4c7a9b..99ca2ff 100644
--- a/libavformat/smjpegdec.c
+++ b/libavformat/smjpegdec.c
@@ -58,7 +58,7 @@ static int smjpeg_read_header(AVFormatContext *s)
duration = avio_rb32(pb); // in msec
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
htype = avio_rl32(pb);
switch (htype) {
case SMJPEG_TXT:
@@ -141,7 +141,7 @@ static int smjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pos;
int ret;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
pos = avio_tell(s->pb);
dtype = avio_rl32(s->pb);
diff --git a/libavformat/smush.c b/libavformat/smush.c
index a33d509..abb6989 100644
--- a/libavformat/smush.c
+++ b/libavformat/smush.c
@@ -102,7 +102,7 @@ static int smush_read_header(AVFormatContext *ctx)
while (!got_audio && ((read + 8) < size)) {
uint32_t sig, chunk_size;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
sig = avio_rb32(pb);
@@ -196,7 +196,7 @@ static int smush_read_packet(AVFormatContext *ctx, AVPacket *pkt)
while (!done) {
uint32_t sig, size;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
sig = avio_rb32(pb);
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 77c754a..27d3551 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -131,7 +131,7 @@ static int sol_read_packet(AVFormatContext *s,
{
int ret;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR(EIO);
ret= av_get_packet(s->pb, pkt, MAX_SIZE);
if (ret < 0)
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c
index 7da16c9..7c04afa 100644
--- a/libavformat/spdifdec.c
+++ b/libavformat/spdifdec.c
@@ -176,7 +176,7 @@ int ff_spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
while (state != (AV_BSWAP16C(SYNCWORD1) << 16 | AV_BSWAP16C(SYNCWORD2))) {
state = (state << 8) | avio_r8(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
}
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 7f911bd..53182cd 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -88,7 +88,7 @@ static int srt_read_header(AVFormatContext *s)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
ff_subtitles_read_chunk(s->pb, &buf);
if (buf.len) {
diff --git a/libavformat/subviewer1dec.c b/libavformat/subviewer1dec.c
index 1b831b7..6b38533 100644
--- a/libavformat/subviewer1dec.c
+++ b/libavformat/subviewer1dec.c
@@ -53,7 +53,7 @@ static int subviewer1_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = AV_CODEC_ID_SUBVIEWER1;
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[4096];
int len = ff_get_line(s->pb, line, sizeof(line));
int hh, mm, ss;
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index 9e645d2..f1b0fdf 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -84,7 +84,7 @@ static int subviewer_read_header(AVFormatContext *s)
av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[2048];
int64_t pos = 0;
int len = ff_get_line(s->pb, line, sizeof(line));
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index c95b18e..0f78b17 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -39,7 +39,7 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)
{
int tag, len;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
tag = avio_rl16(pb);
diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index 4888a77..3eb1a8e 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -68,7 +68,7 @@ static int tak_read_header(AVFormatContext *s)
return 0;
}
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
enum TAKMetaDataType type;
int size;
diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index 8be4dbf..ad172f4 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -154,7 +154,7 @@ static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt)
int ret, pkt_size = tmv->stream_index ?
tmv->audio_chunk_size : tmv->video_chunk_size;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
ret = av_get_packet(pb, pkt, pkt_size);
diff --git a/libavformat/tty.c b/libavformat/tty.c
index 3afb9b2..909b550 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -113,7 +113,7 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
TtyDemuxContext *s = avctx->priv_data;
int n;
- if (url_feof(avctx->pb))
+ if (avio_feof(avctx->pb))
return AVERROR_EOF;
n = s->chars_per_frame;
diff --git a/libavformat/txd.c b/libavformat/txd.c
index 400f2cc..cac37d5 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -63,7 +63,7 @@ next_chunk:
chunk_size = avio_rl32(pb);
marker = avio_rl32(pb);
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
if (marker != TXD_MARKER && marker != TXD_MARKER2) {
av_log(s, AV_LOG_ERROR, "marker does not match\n");
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index e924666..3afe398 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -91,7 +91,7 @@ static int vc1t_read_packet(AVFormatContext *s,
int keyframe = 0;
uint32_t pts;
- if(url_feof(pb))
+ if(avio_feof(pb))
return AVERROR(EIO);
frame_size = avio_rl24(pb);
diff --git a/libavformat/vivo.c b/libavformat/vivo.c
index e0a1814..7287379 100644
--- a/libavformat/vivo.c
+++ b/libavformat/vivo.c
@@ -75,7 +75,7 @@ static int vivo_get_packet_header(AVFormatContext *s)
AVIOContext *pb = s->pb;
unsigned c, get_length = 0;
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
c = avio_r8(pb);
@@ -250,7 +250,7 @@ static int vivo_read_packet(AVFormatContext *s, AVPacket *pkt)
restart:
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
switch (vivo->type) {
@@ -281,7 +281,7 @@ restart:
while (vivo->sequence == old_sequence &&
(((vivo->type - 1) >> 1) == ((old_type - 1) >> 1))) {
- if (url_feof(pb)) {
+ if (avio_feof(pb)) {
ret = AVERROR_EOF;
break;
}
diff --git a/libavformat/vplayerdec.c b/libavformat/vplayerdec.c
index 73a48db..619ccfd 100644
--- a/libavformat/vplayerdec.c
+++ b/libavformat/vplayerdec.c
@@ -65,7 +65,7 @@ static int vplayer_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = AV_CODEC_ID_VPLAYER;
- while (!url_feof(s->pb)) {
+ while (!avio_feof(s->pb)) {
char line[4096];
char *p = line;
const int64_t pos = avio_tell(s->pb);
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 74c7f5f..d1ea0b4 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -166,7 +166,7 @@ static int vqf_read_header(AVFormatContext *s)
header_size -= len;
- } while (header_size >= 0 && !url_feof(s->pb));
+ } while (header_size >= 0 && !avio_feof(s->pb));
switch (rate_flag) {
case -1:
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 1d77402..7e0d5f4 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -82,7 +82,7 @@ static int64_t find_tag(WAVDemuxContext * wav, AVIOContext *pb, uint32_t tag1)
int64_t size;
for (;;) {
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR_EOF;
size = next_tag(pb, &tag);
if (tag == tag1)
@@ -291,7 +291,7 @@ static int wav_read_header(AVFormatContext *s)
size = next_tag(pb, &tag);
next_tag_ofs = avio_tell(pb) + size;
- if (url_feof(pb))
+ if (avio_feof(pb))
break;
switch (tag) {
@@ -434,7 +434,7 @@ static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16])
uint8_t guid[16];
int64_t size;
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
avio_read(pb, guid, 16);
size = avio_rl64(pb);
if (size <= 24)
@@ -652,7 +652,7 @@ static int w64_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
if (avio_read(pb, guid, 16) != 16)
break;
size = avio_rl64(pb);
@@ -692,7 +692,7 @@ static int w64_read_header(AVFormatContext *s)
for (i = 0; i < count; i++) {
char chunk_key[5], *value;
- if (url_feof(pb) || (cur = avio_tell(pb)) < 0 || cur > end - 8 /* = tag + size */)
+ if (avio_feof(pb) || (cur = avio_tell(pb)) < 0 || cur > end - 8 /* = tag + size */)
break;
chunk_key[4] = 0;
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 408c050..a60f128 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -159,7 +159,7 @@ static int wc3_read_header(AVFormatContext *s)
fourcc_tag = avio_rl32(pb);
/* chunk sizes are 16-bit aligned */
size = (avio_rb32(pb) + 1) & (~1);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
} while (fourcc_tag != BRCH_TAG);
@@ -211,7 +211,7 @@ static int wc3_read_packet(AVFormatContext *s,
fourcc_tag = avio_rl32(pb);
/* chunk sizes are 16-bit aligned */
size = (avio_rb32(pb) + 1) & (~1);
- if (url_feof(pb))
+ if (avio_feof(pb))
return AVERROR(EIO);
switch (fourcc_tag) {
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index cfdc555..c70057c 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -76,7 +76,7 @@ static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size)
if (wf->error || pb->error)
return -1;
- if (wf->position >= wf->length || url_feof(pb))
+ if (wf->position >= wf->length || avio_feof(pb))
return 0;
buf_size = FFMIN(buf_size, wf->length - wf->position);
@@ -533,7 +533,7 @@ static void parse_legacy_attrib(AVFormatContext *s, AVIOContext *pb)
{
ff_asf_guid guid;
int length, type;
- while(!url_feof(pb)) {
+ while(!avio_feof(pb)) {
char key[1024];
ff_get_guid(pb, &guid);
type = avio_rl32(pb);
@@ -761,7 +761,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
{
WtvContext *wtv = s->priv_data;
AVIOContext *pb = wtv->pb;
- while (!url_feof(pb)) {
+ while (!avio_feof(pb)) {
ff_asf_guid g;
int len, sid, consumed;
@@ -981,7 +981,7 @@ static int read_header(AVFormatContext *s)
while(1) {
uint64_t timestamp = avio_rl64(pb);
uint64_t frame_nb = avio_rl64(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
break;
ff_add_index_entry(&wtv->index_entries, &wtv->nb_index_entries, &wtv->index_entries_allocated_size,
0, timestamp, frame_nb, 0, AVINDEX_KEYFRAME);
@@ -995,7 +995,7 @@ static int read_header(AVFormatContext *s)
while (1) {
uint64_t frame_nb = avio_rl64(pb);
uint64_t position = avio_rl64(pb);
- if (url_feof(pb))
+ if (avio_feof(pb))
break;
for (i = wtv->nb_index_entries - 1; i >= 0; i--) {
AVIndexEntry *e = wtv->index_entries + i;
diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c
index 4eaec40..5a8d9c7 100644
--- a/libavformat/wvdec.c
+++ b/libavformat/wvdec.c
@@ -260,7 +260,7 @@ static int wv_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pos;
uint32_t block_samples;
- if (url_feof(s->pb))
+ if (avio_feof(s->pb))
return AVERROR_EOF;
if (wc->block_parsed) {
if ((ret = wv_read_block_header(s, s->pb)) < 0)
OpenPOWER on IntegriCloud