# HG changeset patch # User michael # Date 1213356636 0 # Node ID 7baaf426d757fd9f544f8d72ad89a3e3440ed024 # Parent b00b81c315e5527c892d0ec9421135fd2b39fcac Calculate ftyp size instead of hardcoding it. diff -r b00b81c315e5 -r 7baaf426d757 movenc.c --- a/movenc.c Thu Jun 12 03:08:41 2008 +0000 +++ b/movenc.c Fri Jun 13 11:30:36 2008 +0000 @@ -1377,9 +1377,10 @@ 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 @@ put_tag(pb, "isom"); else put_tag(pb, "qt "); + return updateSize(pb, pos); } static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)