Revision 384c9c2f libavformat/avienc.c

View differences:

libavformat/avienc.c
124 124
    int64_t file_size;
125 125
    AVCodecContext* stream;
126 126

  
127
    file_size = url_ftell(pb);
127
    file_size = avio_tell(pb);
128 128
    for(n = 0; n < s->nb_streams; n++) {
129 129
        AVIStream *avist= s->streams[n]->priv_data;
130 130

  
......
201 201
        avio_wl32(pb, AVIF_TRUSTCKTYPE | AVIF_ISINTERLEAVED); /* flags */
202 202
    else
203 203
        avio_wl32(pb, AVIF_TRUSTCKTYPE | AVIF_HASINDEX | AVIF_ISINTERLEAVED); /* flags */
204
    avi->frames_hdr_all = url_ftell(pb); /* remember this offset to fill later */
204
    avi->frames_hdr_all = avio_tell(pb); /* remember this offset to fill later */
205 205
    avio_wl32(pb, nb_frames); /* nb frames, filled later */
206 206
    avio_wl32(pb, 0); /* initial frame */
207 207
    avio_wl32(pb, s->nb_streams); /* nb streams */
......
258 258
        av_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
259 259

  
260 260
        avio_wl32(pb, 0); /* start */
261
        avist->frames_hdr_strm = url_ftell(pb); /* remember this offset to fill later */
261
        avist->frames_hdr_strm = avio_tell(pb); /* remember this offset to fill later */
262 262
        if (url_is_streamed(pb))
263 263
            avio_wl32(pb, AVI_MAX_RIFF_SIZE); /* FIXME: this may be broken, but who cares */
264 264
        else
......
419 419
         ix_tag[3] = '0' + i;
420 420

  
421 421
         /* Writing AVI OpenDML leaf index chunk */
422
         ix = url_ftell(pb);
422
         ix = avio_tell(pb);
423 423
         ffio_wfourcc(pb, ix_tag);     /* ix?? */
424 424
         avio_wl32(pb, avist->indexes.entry * 8 + 24);
425 425
                                      /* chunk size */
......
439 439
                          (ie->flags & 0x10 ? 0 : 0x80000000));
440 440
         }
441 441
         put_flush_packet(pb);
442
         pos = url_ftell(pb);
442
         pos = avio_tell(pb);
443 443

  
444 444
         /* Updating one entry in the AVI OpenDML master index */
445 445
         avio_seek(pb, avist->indexes.indx_start - 8, SEEK_SET);
......
533 533

  
534 534
    // Make sure to put an OpenDML chunk when the file size exceeds the limits
535 535
    if (!url_is_streamed(pb) &&
536
        (url_ftell(pb) - avi->riff_start > AVI_MAX_RIFF_SIZE)) {
536
        (avio_tell(pb) - avi->riff_start > AVI_MAX_RIFF_SIZE)) {
537 537

  
538 538
        avi_write_ix(s);
539 539
        ff_end_tag(pb, avi->movi_list);
......
567 567
        }
568 568

  
569 569
        idx->cluster[cl][id].flags = flags;
570
        idx->cluster[cl][id].pos = url_ftell(pb) - avi->movi_list;
570
        idx->cluster[cl][id].pos = avio_tell(pb) - avi->movi_list;
571 571
        idx->cluster[cl][id].len = size;
572 572
        idx->entry++;
573 573
    }
......
600 600
            ff_end_tag(pb, avi->movi_list);
601 601
            ff_end_tag(pb, avi->riff_start);
602 602

  
603
            file_size = url_ftell(pb);
603
            file_size = avio_tell(pb);
604 604
            avio_seek(pb, avi->odml_list - 8, SEEK_SET);
605 605
            ffio_wfourcc(pb, "LIST"); /* Making this AVI OpenDML one */
606 606
            avio_seek(pb, 16, SEEK_CUR);

Also available in: Unified diff