Commit 78844e00 authored by michael's avatar michael

Calculate ftyp size instead of hardcoding it.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13763 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b8e6dfd3
...@@ -1377,9 +1377,10 @@ static int mov_write_mdat_tag(ByteIOContext *pb, MOVContext *mov) ...@@ -1377,9 +1377,10 @@ static int mov_write_mdat_tag(ByteIOContext *pb, MOVContext *mov)
static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
{ {
MOVContext *mov = s->priv_data; MOVContext *mov = s->priv_data;
offset_t pos = url_ftell(pb);
int i; int i;
put_be32(pb, 0x14); /* size */ put_be32(pb, 0); /* size */
put_tag(pb, "ftyp"); put_tag(pb, "ftyp");
if (mov->mode == MODE_3GP) if (mov->mode == MODE_3GP)
...@@ -1415,6 +1416,7 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) ...@@ -1415,6 +1416,7 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
put_tag(pb, "isom"); put_tag(pb, "isom");
else else
put_tag(pb, "qt "); put_tag(pb, "qt ");
return updateSize(pb, pos);
} }
static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment