Revision a2704c97 libavformat/rmdec.c

View differences:

libavformat/rmdec.c
131 131
    version = avio_rb16(pb); /* version */
132 132
    if (version == 3) {
133 133
        int header_size = avio_rb16(pb);
134
        int64_t startpos = url_ftell(pb);
134
        int64_t startpos = avio_tell(pb);
135 135
        avio_seek(pb, 14, SEEK_CUR);
136 136
        rm_read_metadata(s, 0);
137
        if ((startpos + header_size) >= url_ftell(pb) + 2) {
137
        if ((startpos + header_size) >= avio_tell(pb) + 2) {
138 138
            // fourcc (should always be "lpcJ")
139 139
            avio_r8(pb);
140 140
            get_str8(pb, buf, sizeof(buf));
141 141
        }
142 142
        // Skip extra header crap (this should never happen)
143
        if ((startpos + header_size) > url_ftell(pb))
144
            avio_seek(pb, header_size + startpos - url_ftell(pb), SEEK_CUR);
143
        if ((startpos + header_size) > avio_tell(pb))
144
            avio_seek(pb, header_size + startpos - avio_tell(pb), SEEK_CUR);
145 145
        st->codec->sample_rate = 8000;
146 146
        st->codec->channels = 1;
147 147
        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
......
273 273
    int ret;
274 274

  
275 275
    av_set_pts_info(st, 64, 1, 1000);
276
    codec_pos = url_ftell(pb);
276
    codec_pos = avio_tell(pb);
277 277
    v = avio_rb32(pb);
278 278
    if (v == MKTAG(0xfd, 'a', 'r', '.')) {
279 279
        /* ra type header */
......
301 301
        fps2= avio_rb16(pb);
302 302
        avio_rb16(pb);
303 303

  
304
        if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (url_ftell(pb) - codec_pos))) < 0)
304
        if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0)
305 305
            return ret;
306 306

  
307 307
//        av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);
......
320 320

  
321 321
skip:
322 322
    /* skip codec info */
323
    size = url_ftell(pb) - codec_pos;
323
    size = avio_tell(pb) - codec_pos;
324 324
    avio_seek(pb, codec_data_size - size, SEEK_CUR);
325 325

  
326 326
    return 0;
......
362 362
        }
363 363

  
364 364
skip:
365
        if (next_off && url_ftell(pb) != next_off &&
365
        if (next_off && avio_tell(pb) != next_off &&
366 366
            avio_seek(pb, next_off, SEEK_SET) < 0)
367 367
            return -1;
368 368
    } while (next_off);
......
480 480
    avio_rb32(pb); /* next data header */
481 481

  
482 482
    if (!data_off)
483
        data_off = url_ftell(pb) - 18;
483
        data_off = avio_tell(pb) - 18;
484 484
    if (indx_off && !url_is_streamed(pb) && !(s->flags & AVFMT_FLAG_IGNIDX) &&
485 485
        avio_seek(pb, indx_off, SEEK_SET) >= 0) {
486 486
        rm_read_index(s);
......
517 517

  
518 518
    while(!url_feof(pb)){
519 519
        int len, num, i;
520
        *pos= url_ftell(pb) - 3;
520
        *pos= avio_tell(pb) - 3;
521 521
        if(rm->remaining_len > 0){
522 522
            num= rm->current_stream;
523 523
            len= rm->remaining_len;
......
624 624
        vst->videobufpos = 8*vst->slices + 1;
625 625
        vst->cur_slice = 0;
626 626
        vst->curpic_num = pic_num;
627
        vst->pktpos = url_ftell(pb);
627
        vst->pktpos = avio_tell(pb);
628 628
    }
629 629
    if(type == 2)
630 630
        len = FFMIN(len, pos);
......
841 841
                len = !ast->audio_framesize ? RAW_PACKET_SIZE :
842 842
                    ast->coded_framesize * ast->sub_packet_h / 2;
843 843
                flags = (seq++ == 1) ? 2 : 0;
844
                pos = url_ftell(s->pb);
844
                pos = avio_tell(s->pb);
845 845
            } else {
846 846
                len=sync(s, &timestamp, &flags, &i, &pos);
847 847
                if (len > 0)

Also available in: Unified diff