Revision a2704c97 libavformat/matroskadec.c
libavformat/matroskadec.c | ||
---|---|---|
517 | 517 |
static int ebml_level_end(MatroskaDemuxContext *matroska) |
518 | 518 |
{ |
519 | 519 |
AVIOContext *pb = matroska->ctx->pb; |
520 |
int64_t pos = url_ftell(pb);
|
|
520 |
int64_t pos = avio_tell(pb);
|
|
521 | 521 |
|
522 | 522 |
if (matroska->num_levels > 0) { |
523 | 523 |
MatroskaLevel *level = &matroska->levels[matroska->num_levels - 1]; |
... | ... | |
549 | 549 |
if (!(total = avio_r8(pb))) { |
550 | 550 |
/* we might encounter EOS here */ |
551 | 551 |
if (!url_feof(pb)) { |
552 |
int64_t pos = url_ftell(pb);
|
|
552 |
int64_t pos = avio_tell(pb);
|
|
553 | 553 |
av_log(matroska->ctx, AV_LOG_ERROR, |
554 | 554 |
"Read error at pos. %"PRIu64" (0x%"PRIx64")\n", |
555 | 555 |
pos, pos); |
... | ... | |
560 | 560 |
/* get the length of the EBML number */ |
561 | 561 |
read = 8 - ff_log2_tab[total]; |
562 | 562 |
if (read > max_size) { |
563 |
int64_t pos = url_ftell(pb) - 1;
|
|
563 |
int64_t pos = avio_tell(pb) - 1;
|
|
564 | 564 |
av_log(matroska->ctx, AV_LOG_ERROR, |
565 | 565 |
"Invalid EBML number size tag 0x%02x at pos %"PRIu64" (0x%"PRIx64")\n", |
566 | 566 |
(uint8_t) total, pos, pos); |
... | ... | |
659 | 659 |
return AVERROR(ENOMEM); |
660 | 660 |
|
661 | 661 |
bin->size = length; |
662 |
bin->pos = url_ftell(pb);
|
|
662 |
bin->pos = avio_tell(pb);
|
|
663 | 663 |
if (avio_read(pb, bin->data, length) != length) { |
664 | 664 |
av_freep(&bin->data); |
665 | 665 |
return AVERROR(EIO); |
... | ... | |
685 | 685 |
} |
686 | 686 |
|
687 | 687 |
level = &matroska->levels[matroska->num_levels++]; |
688 |
level->start = url_ftell(pb);
|
|
688 |
level->start = avio_tell(pb);
|
|
689 | 689 |
level->length = length; |
690 | 690 |
|
691 | 691 |
return 0; |
... | ... | |
827 | 827 |
case EBML_NEST: if ((res=ebml_read_master(matroska, length)) < 0) |
828 | 828 |
return res; |
829 | 829 |
if (id == MATROSKA_ID_SEGMENT) |
830 |
matroska->segment_start = url_ftell(matroska->ctx->pb);
|
|
830 |
matroska->segment_start = avio_tell(matroska->ctx->pb);
|
|
831 | 831 |
return ebml_parse_nest(matroska, syntax->def.n, data); |
832 | 832 |
case EBML_PASS: return ebml_parse_id(matroska, syntax->def.n, id, data); |
833 | 833 |
case EBML_STOP: return 1; |
... | ... | |
1111 | 1111 |
EbmlList *seekhead_list = &matroska->seekhead; |
1112 | 1112 |
MatroskaSeekhead *seekhead = seekhead_list->elem; |
1113 | 1113 |
uint32_t level_up = matroska->level_up; |
1114 |
int64_t before_pos = url_ftell(matroska->ctx->pb);
|
|
1114 |
int64_t before_pos = avio_tell(matroska->ctx->pb);
|
|
1115 | 1115 |
uint32_t saved_id = matroska->current_id; |
1116 | 1116 |
MatroskaLevel level; |
1117 | 1117 |
int i; |
... | ... | |
1842 | 1842 |
EbmlList *blocks_list; |
1843 | 1843 |
MatroskaBlock *blocks; |
1844 | 1844 |
int i, res; |
1845 |
int64_t pos = url_ftell(matroska->ctx->pb);
|
|
1845 |
int64_t pos = avio_tell(matroska->ctx->pb);
|
|
1846 | 1846 |
matroska->prev_pkt = NULL; |
1847 | 1847 |
if (matroska->current_id) |
1848 | 1848 |
pos -= 4; /* sizeof the ID which was already read */ |
Also available in: Unified diff