Revision a2704c97 libavformat/flvenc.c

View differences:

libavformat/flvenc.c
221 221

  
222 222
    /* write meta_tag */
223 223
    avio_w8(pb, 18);         // tag type META
224
    metadata_size_pos= url_ftell(pb);
224
    metadata_size_pos= avio_tell(pb);
225 225
    avio_wb24(pb, 0);          // size of data part (sum of all parts below)
226 226
    avio_wb24(pb, 0);          // time stamp
227 227
    avio_wb32(pb, 0);          // reserved
......
237 237
    avio_wb32(pb, 5*!!video_enc + 5*!!audio_enc + 2); // +2 for duration and file size
238 238

  
239 239
    put_amf_string(pb, "duration");
240
    flv->duration_offset= url_ftell(pb);
240
    flv->duration_offset= avio_tell(pb);
241 241
    put_amf_double(pb, s->duration / AV_TIME_BASE); // fill in the guessed duration, it'll be corrected later if incorrect
242 242

  
243 243
    if(video_enc){
......
281 281
    }
282 282

  
283 283
    put_amf_string(pb, "filesize");
284
    flv->filesize_offset= url_ftell(pb);
284
    flv->filesize_offset= avio_tell(pb);
285 285
    put_amf_double(pb, 0); // delayed write
286 286

  
287 287
    put_amf_string(pb, "");
288 288
    avio_w8(pb, AMF_END_OF_OBJECT);
289 289

  
290 290
    /* write total size of tag */
291
    data_size= url_ftell(pb) - metadata_size_pos - 10;
291
    data_size= avio_tell(pb) - metadata_size_pos - 10;
292 292
    avio_seek(pb, metadata_size_pos, SEEK_SET);
293 293
    avio_wb24(pb, data_size);
294 294
    avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
......
304 304
            avio_wb24(pb, 0); // ts
305 305
            avio_w8(pb, 0); // ts ext
306 306
            avio_wb24(pb, 0); // streamid
307
            pos = url_ftell(pb);
307
            pos = avio_tell(pb);
308 308
            if (enc->codec_id == CODEC_ID_AAC) {
309 309
                avio_w8(pb, get_audio_flags(enc));
310 310
                avio_w8(pb, 0); // AAC sequence header
......
315 315
                avio_wb24(pb, 0); // composition time
316 316
                ff_isom_write_avcc(pb, enc->extradata, enc->extradata_size);
317 317
            }
318
            data_size = url_ftell(pb) - pos;
318
            data_size = avio_tell(pb) - pos;
319 319
            avio_seek(pb, -data_size - 10, SEEK_CUR);
320 320
            avio_wb24(pb, data_size);
321 321
            avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
......
343 343
        }
344 344
    }
345 345

  
346
    file_size = url_ftell(pb);
346
    file_size = avio_tell(pb);
347 347

  
348 348
    /* update informations */
349 349
    avio_seek(pb, flv->duration_offset, SEEK_SET);

Also available in: Unified diff