diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-06-13 11:30:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-06-13 11:30:36 +0000 |
commit | 1560b667143c321d1baaa784e4cfe9f01bd796b6 (patch) | |
tree | 441336fa10191249c81ccafc053ea9a40b12d0fa /libavformat | |
parent | a74dc5b9146fff53d414ad81a75a5a2621f4ac8a (diff) | |
download | ffmpeg-1560b667143c321d1baaa784e4cfe9f01bd796b6.tar.gz |
Calculate ftyp size instead of hardcoding it.
Originally committed as revision 13763 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 57cbc56c91..5337c120b9 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1377,9 +1377,10 @@ static int mov_write_mdat_tag(ByteIOContext *pb, MOVContext *mov) static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) { MOVContext *mov = s->priv_data; + offset_t pos = url_ftell(pb); int i; - put_be32(pb, 0x14); /* size */ + put_be32(pb, 0); /* size */ put_tag(pb, "ftyp"); if (mov->mode == MODE_3GP) @@ -1415,6 +1416,7 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) put_tag(pb, "isom"); else put_tag(pb, "qt "); + return updateSize(pb, pos); } static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) |