Mercurial > libavformat.hg
comparison movenc.c @ 3470:d8bbf9265f03 libavformat
put avc1 brand in compat list when h264 is present
author | bcoudurier |
---|---|
date | Sat, 14 Jun 2008 21:05:28 +0000 |
parents | e819cfc46b1d |
children | a7ba44edfacb |
comparison
equal
deleted
inserted
replaced
3469:e819cfc46b1d | 3470:d8bbf9265f03 |
---|---|
1376 /* TODO: This needs to be more general */ | 1376 /* TODO: This needs to be more general */ |
1377 static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) | 1377 static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) |
1378 { | 1378 { |
1379 MOVContext *mov = s->priv_data; | 1379 MOVContext *mov = s->priv_data; |
1380 offset_t pos = url_ftell(pb); | 1380 offset_t pos = url_ftell(pb); |
1381 int has_h264 = 0; | |
1381 int i; | 1382 int i; |
1383 | |
1384 for (i = 0; i < s->nb_streams; i++) { | |
1385 AVStream *st = s->streams[i]; | |
1386 if (st->codec->codec_id == CODEC_ID_H264) | |
1387 has_h264 = 1; | |
1388 } | |
1382 | 1389 |
1383 put_be32(pb, 0); /* size */ | 1390 put_be32(pb, 0); /* size */ |
1384 put_tag(pb, "ftyp"); | 1391 put_tag(pb, "ftyp"); |
1385 | 1392 |
1386 if (mov->mode == MODE_3GP) | 1393 if (mov->mode == MODE_3GP) |
1405 put_be32(pb, 0x200); | 1412 put_be32(pb, 0x200); |
1406 | 1413 |
1407 if(mov->mode != MODE_MOV){ | 1414 if(mov->mode != MODE_MOV){ |
1408 put_tag(pb, "isom"); | 1415 put_tag(pb, "isom"); |
1409 put_tag(pb, "iso2"); | 1416 put_tag(pb, "iso2"); |
1417 if(has_h264) | |
1418 put_tag(pb, "avc1"); | |
1410 } | 1419 } |
1411 | 1420 |
1412 if (mov->mode == MODE_3GP) | 1421 if (mov->mode == MODE_3GP) |
1413 put_tag(pb, "3gp4"); | 1422 put_tag(pb, "3gp4"); |
1414 else if (mov->mode & MODE_3G2) | 1423 else if (mov->mode & MODE_3G2) |