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/flvdec.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/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 3b30c7f200..6113d951bf 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -148,7 +148,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst case AMF_DATA_TYPE_OBJECT: { unsigned int keylen; - while(url_ftell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) { + while(avio_tell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) { avio_seek(ioc, keylen, SEEK_CUR); //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. @@ -163,7 +163,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst break; //these take up no additional space case AMF_DATA_TYPE_MIXEDARRAY: avio_seek(ioc, 4, SEEK_CUR); //skip 32-bit max array index - while(url_ftell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) { + while(avio_tell(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) return -1; @@ -175,7 +175,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst unsigned int arraylen, i; arraylen = avio_rb32(ioc); - for(i = 0; i < arraylen && url_ftell(ioc) < max_pos - 1; i++) { + for(i = 0; i < arraylen && avio_tell(ioc) < max_pos - 1; i++) { if(amf_parse_object(s, NULL, NULL, NULL, max_pos, depth + 1) < 0) return -1; //if we couldn't skip, bomb out. } @@ -305,7 +305,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) AVStream *st = NULL; for(;;avio_seek(s->pb, 4, SEEK_CUR)){ /* pkt size is repeated at end. skip it */ - pos = url_ftell(s->pb); + pos = avio_tell(s->pb); type = avio_r8(s->pb); size = avio_rb24(s->pb); dts = avio_rb24(s->pb); @@ -319,7 +319,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) if(size == 0) continue; - next= size + url_ftell(s->pb); + next= size + avio_tell(s->pb); if (type == FLV_TAG_TYPE_AUDIO) { is_audio=1; @@ -372,7 +372,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) // if not streamed and no duration from metadata then seek to end to find the duration from the timestamps if(!url_is_streamed(s->pb) && (!s->duration || s->duration==AV_NOPTS_VALUE)){ int size; - const int64_t pos= url_ftell(s->pb); + const int64_t pos= avio_tell(s->pb); const int64_t fsize= url_fsize(s->pb); avio_seek(s->pb, fsize-4, SEEK_SET); size= avio_rb32(s->pb); |