Revision a2704c97 libavformat/ffmdec.c

View differences:

libavformat/ffmdec.c
65 65
    len = ffm->packet_end - ffm->packet_ptr;
66 66
    if (size <= len)
67 67
        return 1;
68
    pos = url_ftell(s->pb);
68
    pos = avio_tell(s->pb);
69 69
    if (!ffm->write_index) {
70 70
        if (pos == ffm->file_size)
71 71
            return AVERROR_EOF;
......
117 117
        if (len > size)
118 118
            len = size;
119 119
        if (len == 0) {
120
            if (url_ftell(pb) == ffm->file_size)
120
            if (avio_tell(pb) == ffm->file_size)
121 121
                avio_seek(pb, ffm->packet_size, SEEK_SET);
122 122
    retry_read:
123 123
            id = avio_rb16(pb); /* PACKET_ID */
......
136 136
            if (ffm->first_packet || (frame_offset & 0x8000)) {
137 137
                if (!frame_offset) {
138 138
                    /* This packet has no frame headers in it */
139
                    if (url_ftell(pb) >= ffm->packet_size * 3) {
139
                    if (avio_tell(pb) >= ffm->packet_size * 3) {
140 140
                        avio_seek(pb, -ffm->packet_size * 2, SEEK_CUR);
141 141
                        goto retry_read;
142 142
                    }
......
203 203
    //int64_t orig_write_index = ffm->write_index;
204 204
    int64_t pos_min, pos_max;
205 205
    int64_t pts_start;
206
    int64_t ptr = url_ftell(pb);
206
    int64_t ptr = avio_tell(pb);
207 207

  
208 208

  
209 209
    pos_min = 0;
......
381 381
    }
382 382

  
383 383
    /* get until end of block reached */
384
    while ((url_ftell(pb) % ffm->packet_size) != 0)
384
    while ((avio_tell(pb) % ffm->packet_size) != 0)
385 385
        avio_r8(pb);
386 386

  
387 387
    /* init packet demux */
......
410 410
            return ret;
411 411

  
412 412
        av_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
413
               url_ftell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
413
               avio_tell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
414 414
        if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) !=
415 415
            FRAME_HEADER_SIZE)
416 416
            return -1;
......
437 437
            ffm->read_state = READ_HEADER;
438 438
            return -1;
439 439
        }
440
        pkt->pos = url_ftell(s->pb);
440
        pkt->pos = avio_tell(s->pb);
441 441
        if (ffm->header[1] & FLAG_KEY_FRAME)
442 442
            pkt->flags |= AV_PKT_FLAG_KEY;
443 443

  

Also available in: Unified diff