aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-14 21:05:28 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-14 21:05:28 +0000
commit835790846c779cdb3225c262b83aa9cd570bfd0d (patch)
tree5c9bf353120d2321742b3da44d5a72b9ab93b2bf /libavformat/movenc.c
parent5171fd9dd579687b4cd17c56e70a1ec6e3041553 (diff)
downloadffmpeg-835790846c779cdb3225c262b83aa9cd570bfd0d.tar.gz
put avc1 brand in compat list when h264 is present
Originally committed as revision 13768 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index cb022a626e..d5102f7448 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1378,8 +1378,15 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
{
MOVContext *mov = s->priv_data;
offset_t pos = url_ftell(pb);
+ int has_h264 = 0;
int i;
+ for (i = 0; i < s->nb_streams; i++) {
+ AVStream *st = s->streams[i];
+ if (st->codec->codec_id == CODEC_ID_H264)
+ has_h264 = 1;
+ }
+
put_be32(pb, 0); /* size */
put_tag(pb, "ftyp");
@@ -1407,6 +1414,8 @@ static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
if(mov->mode != MODE_MOV){
put_tag(pb, "isom");
put_tag(pb, "iso2");
+ if(has_h264)
+ put_tag(pb, "avc1");
}
if (mov->mode == MODE_3GP)