* commit '29d61d73b1cbf0dcd1f79bc49c7df01b0a377c85':
movenc: Allow override of major brand in ftyp atom
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -67,6 +67,7 @@ static const AVOption options[] = { |
67 | 67 |
{ "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, |
68 | 68 |
{ "use_editlist", "use edit list", offsetof(MOVMuxContext, use_editlist), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM}, |
69 | 69 |
{ "video_track_timescale", "set timescale of all video tracks", offsetof(MOVMuxContext, video_track_timescale), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, |
70 |
+ { "brand", "Override major brand", offsetof(MOVMuxContext, major_brand), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM }, |
|
70 | 71 |
{ NULL }, |
71 | 72 |
}; |
72 | 73 |
|
... | ... |
@@ -2960,7 +2961,9 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) |
2960 | 2960 |
avio_wb32(pb, 0); /* size */ |
2961 | 2961 |
ffio_wfourcc(pb, "ftyp"); |
2962 | 2962 |
|
2963 |
- if (mov->mode == MODE_3GP) { |
|
2963 |
+ if (mov->major_brand && strlen(mov->major_brand) >= 4) |
|
2964 |
+ ffio_wfourcc(pb, mov->major_brand); |
|
2965 |
+ else if (mov->mode == MODE_3GP) { |
|
2964 | 2966 |
ffio_wfourcc(pb, has_h264 ? "3gp6" : "3gp4"); |
2965 | 2967 |
minor = has_h264 ? 0x100 : 0x200; |
2966 | 2968 |
} else if (mov->mode & MODE_3G2) { |