Calculate ftyp size instead of hardcoding it.

Originally committed as revision 13763 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 17 years ago
parent a74dc5b914
commit 1560b66714
  1. 4
      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)

Loading…
Cancel
Save