Mercurial > libavformat.hg
changeset 3458:1ccb0b1813c9 libavformat
write usual brand for ipod format
author | bcoudurier |
---|---|
date | Wed, 11 Jun 2008 09:33:35 +0000 |
parents | 0bbc97acefde |
children | a79f6237c3d2 |
files | movenc.c |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Wed Jun 11 09:06:27 2008 +0000 +++ b/movenc.c Wed Jun 11 09:33:35 2008 +0000 @@ -1351,6 +1351,7 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) { MOVContext *mov = s->priv_data; + int i; put_be32(pb, 0x14); /* size */ put_tag(pb, "ftyp"); @@ -1361,9 +1362,17 @@ put_tag(pb, "3g2a"); else if (mov->mode == MODE_PSP) put_tag(pb, "MSNV"); - else if (mov->mode == MODE_MP4 || mov->mode == MODE_IPOD) + else if (mov->mode == MODE_MP4) put_tag(pb, "isom"); - else + else if (mov->mode == MODE_IPOD) { + for (i = 0; i < s->nb_streams; i++) + if (s->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) { + put_tag(pb, "M4V "); + break; + } + if (i == s->nb_streams) + put_tag(pb, "M4A "); + } else put_tag(pb, "qt "); put_be32(pb, 0x200); @@ -1374,8 +1383,10 @@ put_tag(pb, "3g2a"); else if (mov->mode == MODE_PSP) put_tag(pb, "MSNV"); - else if (mov->mode == MODE_MP4 || mov->mode == MODE_IPOD) + else if (mov->mode == MODE_MP4) put_tag(pb, "mp41"); + else if (mov->mode == MODE_IPOD) + put_tag(pb, "isom"); else put_tag(pb, "qt "); }