Signed-off-by: Tim Walker <tdskywalker@gmail.com>
(cherry picked from commit 1e9db41e2a2166be5671b088ef4ad06a40af459f)
... | ... |
@@ -64,6 +64,7 @@ static const AVOption options[] = { |
64 | 64 |
{ "min_frag_duration", "Minimum fragment duration", offsetof(MOVMuxContext, min_fragment_duration), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, |
65 | 65 |
{ "frag_size", "Maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, |
66 | 66 |
{ "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}, |
67 |
+ { "brand", "Override major brand", offsetof(MOVMuxContext, major_brand), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM }, |
|
67 | 68 |
{ NULL }, |
68 | 69 |
}; |
69 | 70 |
|
... | ... |
@@ -2564,7 +2565,9 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) |
2564 | 2564 |
avio_wb32(pb, 0); /* size */ |
2565 | 2565 |
ffio_wfourcc(pb, "ftyp"); |
2566 | 2566 |
|
2567 |
- if (mov->mode == MODE_3GP) { |
|
2567 |
+ if (mov->major_brand && strlen(mov->major_brand) >= 4) |
|
2568 |
+ ffio_wfourcc(pb, mov->major_brand); |
|
2569 |
+ else if (mov->mode == MODE_3GP) { |
|
2568 | 2570 |
ffio_wfourcc(pb, has_h264 ? "3gp6" : "3gp4"); |
2569 | 2571 |
minor = has_h264 ? 0x100 : 0x200; |
2570 | 2572 |
} else if (mov->mode & MODE_3G2) { |