summaryrefslogtreecommitdiff
path: root/libavformat/flvenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-03 20:11:45 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-04 11:26:57 -0500
commita2704c9712ad35cc22e7e0d8a79b581c07fa383b (patch)
treeebf5a27a98dbd52d983e38e901661f7525b38e9a /libavformat/flvenc.c
parente16ead0716c2f988d1e26369a4c67b354ff86134 (diff)
avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r--libavformat/flvenc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 7dd47da8a4..68da7f6907 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -221,7 +221,7 @@ static int flv_write_header(AVFormatContext *s)
/* write meta_tag */
avio_w8(pb, 18); // tag type META
- metadata_size_pos= url_ftell(pb);
+ metadata_size_pos= avio_tell(pb);
avio_wb24(pb, 0); // size of data part (sum of all parts below)
avio_wb24(pb, 0); // time stamp
avio_wb32(pb, 0); // reserved
@@ -237,7 +237,7 @@ static int flv_write_header(AVFormatContext *s)
avio_wb32(pb, 5*!!video_enc + 5*!!audio_enc + 2); // +2 for duration and file size
put_amf_string(pb, "duration");
- flv->duration_offset= url_ftell(pb);
+ flv->duration_offset= avio_tell(pb);
put_amf_double(pb, s->duration / AV_TIME_BASE); // fill in the guessed duration, it'll be corrected later if incorrect
if(video_enc){
@@ -281,14 +281,14 @@ static int flv_write_header(AVFormatContext *s)
}
put_amf_string(pb, "filesize");
- flv->filesize_offset= url_ftell(pb);
+ flv->filesize_offset= avio_tell(pb);
put_amf_double(pb, 0); // delayed write
put_amf_string(pb, "");
avio_w8(pb, AMF_END_OF_OBJECT);
/* write total size of tag */
- data_size= url_ftell(pb) - metadata_size_pos - 10;
+ data_size= avio_tell(pb) - metadata_size_pos - 10;
avio_seek(pb, metadata_size_pos, SEEK_SET);
avio_wb24(pb, data_size);
avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
@@ -304,7 +304,7 @@ static int flv_write_header(AVFormatContext *s)
avio_wb24(pb, 0); // ts
avio_w8(pb, 0); // ts ext
avio_wb24(pb, 0); // streamid
- pos = url_ftell(pb);
+ pos = avio_tell(pb);
if (enc->codec_id == CODEC_ID_AAC) {
avio_w8(pb, get_audio_flags(enc));
avio_w8(pb, 0); // AAC sequence header
@@ -315,7 +315,7 @@ static int flv_write_header(AVFormatContext *s)
avio_wb24(pb, 0); // composition time
ff_isom_write_avcc(pb, enc->extradata, enc->extradata_size);
}
- data_size = url_ftell(pb) - pos;
+ data_size = avio_tell(pb) - pos;
avio_seek(pb, -data_size - 10, SEEK_CUR);
avio_wb24(pb, data_size);
avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
@@ -343,7 +343,7 @@ static int flv_write_trailer(AVFormatContext *s)
}
}
- file_size = url_ftell(pb);
+ file_size = avio_tell(pb);
/* update informations */
avio_seek(pb, flv->duration_offset, SEEK_SET);