changeset 3467:7baaf426d757 libavformat

Calculate ftyp size instead of hardcoding it.
author michael
date Fri, 13 Jun 2008 11:30:36 +0000
parents b00b81c315e5
children 08e0dba7c5b1
files movenc.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)