movenc: Allow override of major brand in ftyp atom
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
This commit is contained in:
parent
4f4840377f
commit
1e9db41e2a
@ -64,6 +64,7 @@ static const AVOption options[] = {
|
|||||||
{ "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},
|
{ "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},
|
||||||
{ "frag_size", "Maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
|
{ "frag_size", "Maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
|
||||||
{ "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},
|
{ "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},
|
||||||
|
{ "brand", "Override major brand", offsetof(MOVMuxContext, major_brand), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2564,7 +2565,9 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s)
|
|||||||
avio_wb32(pb, 0); /* size */
|
avio_wb32(pb, 0); /* size */
|
||||||
ffio_wfourcc(pb, "ftyp");
|
ffio_wfourcc(pb, "ftyp");
|
||||||
|
|
||||||
if (mov->mode == MODE_3GP) {
|
if (mov->major_brand && strlen(mov->major_brand) >= 4)
|
||||||
|
ffio_wfourcc(pb, mov->major_brand);
|
||||||
|
else if (mov->mode == MODE_3GP) {
|
||||||
ffio_wfourcc(pb, has_h264 ? "3gp6" : "3gp4");
|
ffio_wfourcc(pb, has_h264 ? "3gp6" : "3gp4");
|
||||||
minor = has_h264 ? 0x100 : 0x200;
|
minor = has_h264 ? 0x100 : 0x200;
|
||||||
} else if (mov->mode & MODE_3G2) {
|
} else if (mov->mode & MODE_3G2) {
|
||||||
|
@ -159,6 +159,8 @@ typedef struct MOVMuxContext {
|
|||||||
AVIOContext *mdat_buf;
|
AVIOContext *mdat_buf;
|
||||||
|
|
||||||
int64_t reserved_moov_pos;
|
int64_t reserved_moov_pos;
|
||||||
|
|
||||||
|
char *major_brand;
|
||||||
} MOVMuxContext;
|
} MOVMuxContext;
|
||||||
|
|
||||||
#define FF_MOV_FLAG_RTP_HINT 1
|
#define FF_MOV_FLAG_RTP_HINT 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user