Revision a2704c97 libavformat/mpegts.c

View differences:

libavformat/mpegts.c
1265 1265
    if (p >= p_end)
1266 1266
        return 0;
1267 1267

  
1268
    pos = url_ftell(ts->stream->pb);
1268
    pos = avio_tell(ts->stream->pb);
1269 1269
    ts->pos47= pos % ts->raw_packet_size;
1270 1270

  
1271 1271
    if (tss->type == MPEGTS_SECTION) {
......
1454 1454
    }
1455 1455

  
1456 1456
    /* read the first 1024 bytes to get packet size */
1457
    pos = url_ftell(pb);
1457
    pos = avio_tell(pb);
1458 1458
    len = avio_read(pb, buf, sizeof(buf));
1459 1459
    if (len != sizeof(buf))
1460 1460
        goto fail;
......
1552 1552

  
1553 1553
    if (av_new_packet(pkt, TS_PACKET_SIZE) < 0)
1554 1554
        return AVERROR(ENOMEM);
1555
    pkt->pos= url_ftell(s->pb);
1555
    pkt->pos= avio_tell(s->pb);
1556 1556
    ret = read_packet(s, pkt->data, ts->raw_packet_size);
1557 1557
    if (ret < 0) {
1558 1558
        av_free_packet(pkt);
......
1562 1562
        /* compute exact PCR for each packet */
1563 1563
        if (parse_pcr(&pcr_h, &pcr_l, pkt->data) == 0) {
1564 1564
            /* we read the next PCR (XXX: optimize it by using a bigger buffer */
1565
            pos = url_ftell(s->pb);
1565
            pos = avio_tell(s->pb);
1566 1566
            for(i = 0; i < MAX_PACKET_READAHEAD; i++) {
1567 1567
                avio_seek(s->pb, pos + i * ts->raw_packet_size, SEEK_SET);
1568 1568
                avio_read(s->pb, pcr_buf, 12);
......
1591 1591
    MpegTSContext *ts = s->priv_data;
1592 1592
    int ret, i;
1593 1593

  
1594
    if (url_ftell(s->pb) != ts->last_pos) {
1594
    if (avio_tell(s->pb) != ts->last_pos) {
1595 1595
        /* seek detected, flush pes buffer */
1596 1596
        for (i = 0; i < NB_PID_MAX; i++) {
1597 1597
            if (ts->pids[i] && ts->pids[i]->type == MPEGTS_PES) {
......
1620 1620
        }
1621 1621
    }
1622 1622

  
1623
    ts->last_pos = url_ftell(s->pb);
1623
    ts->last_pos = avio_tell(s->pb);
1624 1624

  
1625 1625
    return ret;
1626 1626
}
......
1771 1771
    if(av_seek_frame_binary(s, stream_index, target_ts, flags) < 0)
1772 1772
        return -1;
1773 1773

  
1774
    pos= url_ftell(s->pb);
1774
    pos= avio_tell(s->pb);
1775 1775

  
1776 1776
    for(;;) {
1777 1777
        avio_seek(s->pb, pos, SEEK_SET);

Also available in: Unified diff