summaryrefslogtreecommitdiffstats
path: root/libavformat/ffmdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-03 20:11:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-03-05 02:29:31 +0100
commit384c9c2fa79f2f09ed4a5aa4c14ba3ffc6bdc790 (patch)
treea3ec8979530bffeb61b84161d1681120bf1234af /libavformat/ffmdec.c
parent773947ba76c575abc01ba128206c87440dad40ec (diff)
downloadffmpeg-streaming-384c9c2fa79f2f09ed4a5aa4c14ba3ffc6bdc790.zip
ffmpeg-streaming-384c9c2fa79f2f09ed4a5aa4c14ba3ffc6bdc790.tar.gz
avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit a2704c9712ad35cc22e7e0d8a79b581c07fa383b)
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r--libavformat/ffmdec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 7dd567e..2977527 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -65,7 +65,7 @@ static int ffm_is_avail_data(AVFormatContext *s, int size)
len = ffm->packet_end - ffm->packet_ptr;
if (size <= len)
return 1;
- pos = url_ftell(s->pb);
+ pos = avio_tell(s->pb);
if (!ffm->write_index) {
if (pos == ffm->file_size)
return AVERROR_EOF;
@@ -117,7 +117,7 @@ static int ffm_read_data(AVFormatContext *s,
if (len > size)
len = size;
if (len == 0) {
- if (url_ftell(pb) == ffm->file_size)
+ if (avio_tell(pb) == ffm->file_size)
avio_seek(pb, ffm->packet_size, SEEK_SET);
retry_read:
id = avio_rb16(pb); /* PACKET_ID */
@@ -136,7 +136,7 @@ static int ffm_read_data(AVFormatContext *s,
if (ffm->first_packet || (frame_offset & 0x8000)) {
if (!frame_offset) {
/* This packet has no frame headers in it */
- if (url_ftell(pb) >= ffm->packet_size * 3) {
+ if (avio_tell(pb) >= ffm->packet_size * 3) {
avio_seek(pb, -ffm->packet_size * 2, SEEK_CUR);
goto retry_read;
}
@@ -203,7 +203,7 @@ static void adjust_write_index(AVFormatContext *s)
//int64_t orig_write_index = ffm->write_index;
int64_t pos_min, pos_max;
int64_t pts_start;
- int64_t ptr = url_ftell(pb);
+ int64_t ptr = avio_tell(pb);
pos_min = 0;
@@ -381,7 +381,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
/* get until end of block reached */
- while ((url_ftell(pb) % ffm->packet_size) != 0)
+ while ((avio_tell(pb) % ffm->packet_size) != 0)
avio_r8(pb);
/* init packet demux */
@@ -410,7 +410,7 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
av_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
- url_ftell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
+ avio_tell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) !=
FRAME_HEADER_SIZE)
return -1;
@@ -437,7 +437,7 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
ffm->read_state = READ_HEADER;
return -1;
}
- pkt->pos = url_ftell(s->pb);
+ pkt->pos = avio_tell(s->pb);
if (ffm->header[1] & FLAG_KEY_FRAME)
pkt->flags |= AV_PKT_FLAG_KEY;
OpenPOWER on IntegriCloud