summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-11 09:33:35 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-11 09:33:35 +0000
commitc55cc074cc4ac52995836910e5deeadd48a54e91 (patch)
tree9d4d7c02479f46867f6a9c47b3af024edcd93233 /libavformat
parentd32d6defeed5675183190c9aa6ae8e3fdddeffe6 (diff)
write usual brand for ipod format
Originally committed as revision 13744 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 25f67848a5..5ddcd5be8b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1351,6 +1351,7 @@ 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;
+ int i;
put_be32(pb, 0x14); /* size */
put_tag(pb, "ftyp");
@@ -1361,9 +1362,17 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
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 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
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 ");
}