diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-03-03 20:11:45 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-03-04 11:26:57 -0500 |
commit | a2704c9712ad35cc22e7e0d8a79b581c07fa383b (patch) | |
tree | ebf5a27a98dbd52d983e38e901661f7525b38e9a /libavformat/ffmdec.c | |
parent | e16ead0716c2f988d1e26369a4c67b354ff86134 (diff) | |
download | ffmpeg-a2704c9712ad35cc22e7e0d8a79b581c07fa383b.tar.gz |
avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r-- | libavformat/ffmdec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 7dd567ed7f..2977527b97 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; |