diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-14 21:07:59 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-14 21:07:59 +0000 |
commit | cd70d17f5f622feee4b3980c24ea768a489e2f3e (patch) | |
tree | 98897f538658919d98cf3871ec0fe981d8ee6f00 /libavformat | |
parent | 7b0fb8b77a41206104e106cce1a29a0b379434e4 (diff) | |
download | ffmpeg-cd70d17f5f622feee4b3980c24ea768a489e2f3e.tar.gz |
simplify ipod brand selection
Originally committed as revision 13770 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index abc4d58fa9..fd15370331 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1378,11 +1378,13 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) { MOVContext *mov = s->priv_data; offset_t pos = url_ftell(pb); - int has_h264 = 0; + int has_h264 = 0, has_video = 0; int i; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; + if (st->codec->codec_type == CODEC_TYPE_VIDEO) + has_video = 1; if (st->codec->codec_id == CODEC_ID_H264) has_h264 = 1; } @@ -1398,15 +1400,9 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) put_tag(pb, "MSNV"); else if (mov->mode == MODE_MP4) put_tag(pb, "isom"); - 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 + else if (mov->mode == MODE_IPOD) + put_tag(pb, has_video ? "M4V ":"M4A "); + else put_tag(pb, "qt "); put_be32(pb, 0x200); |