diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-03-03 20:11:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-05 02:29:31 +0100 |
commit | 384c9c2fa79f2f09ed4a5aa4c14ba3ffc6bdc790 (patch) | |
tree | a3ec8979530bffeb61b84161d1681120bf1234af /libavformat/matroskadec.c | |
parent | 773947ba76c575abc01ba128206c87440dad40ec (diff) | |
download | ffmpeg-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/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 7480475cd5..ffb9d73d3c 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -517,7 +517,7 @@ static const char *matroska_doctypes[] = { "matroska", "webm" }; static int ebml_level_end(MatroskaDemuxContext *matroska) { AVIOContext *pb = matroska->ctx->pb; - int64_t pos = url_ftell(pb); + int64_t pos = avio_tell(pb); if (matroska->num_levels > 0) { MatroskaLevel *level = &matroska->levels[matroska->num_levels - 1]; @@ -549,7 +549,7 @@ static int ebml_read_num(MatroskaDemuxContext *matroska, AVIOContext *pb, if (!(total = avio_r8(pb))) { /* we might encounter EOS here */ if (!url_feof(pb)) { - int64_t pos = url_ftell(pb); + int64_t pos = avio_tell(pb); av_log(matroska->ctx, AV_LOG_ERROR, "Read error at pos. %"PRIu64" (0x%"PRIx64")\n", pos, pos); @@ -560,7 +560,7 @@ static int ebml_read_num(MatroskaDemuxContext *matroska, AVIOContext *pb, /* get the length of the EBML number */ read = 8 - ff_log2_tab[total]; if (read > max_size) { - int64_t pos = url_ftell(pb) - 1; + int64_t pos = avio_tell(pb) - 1; av_log(matroska->ctx, AV_LOG_ERROR, "Invalid EBML number size tag 0x%02x at pos %"PRIu64" (0x%"PRIx64")\n", (uint8_t) total, pos, pos); @@ -659,7 +659,7 @@ static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin) return AVERROR(ENOMEM); bin->size = length; - bin->pos = url_ftell(pb); + bin->pos = avio_tell(pb); if (avio_read(pb, bin->data, length) != length) { av_freep(&bin->data); return AVERROR(EIO); @@ -685,7 +685,7 @@ static int ebml_read_master(MatroskaDemuxContext *matroska, uint64_t length) } level = &matroska->levels[matroska->num_levels++]; - level->start = url_ftell(pb); + level->start = avio_tell(pb); level->length = length; return 0; @@ -827,7 +827,7 @@ static int ebml_parse_elem(MatroskaDemuxContext *matroska, case EBML_NEST: if ((res=ebml_read_master(matroska, length)) < 0) return res; if (id == MATROSKA_ID_SEGMENT) - matroska->segment_start = url_ftell(matroska->ctx->pb); + matroska->segment_start = avio_tell(matroska->ctx->pb); 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; @@ -1111,7 +1111,7 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) EbmlList *seekhead_list = &matroska->seekhead; MatroskaSeekhead *seekhead = seekhead_list->elem; uint32_t level_up = matroska->level_up; - int64_t before_pos = url_ftell(matroska->ctx->pb); + int64_t before_pos = avio_tell(matroska->ctx->pb); uint32_t saved_id = matroska->current_id; MatroskaLevel level; int i; @@ -1842,7 +1842,7 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska) EbmlList *blocks_list; MatroskaBlock *blocks; int i, res; - int64_t pos = url_ftell(matroska->ctx->pb); + int64_t pos = avio_tell(matroska->ctx->pb); matroska->prev_pkt = NULL; if (matroska->current_id) pos -= 4; /* sizeof the ID which was already read */ |