diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-09-26 08:50:48 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-09-26 08:50:48 +0200 |
commit | 46aae846165c35e6d184087542dd3e610fa36506 (patch) | |
tree | cc1291a3b67312ed0ccd204d10eef6d7a701a51b /libavformat/movenc.c | |
parent | fb37da37ac1e17f643269ea5bad5bee7e79dcb3a (diff) |
lavf/movenc: Allow to disable writing the timecode track.
Fixes ticket #5492.
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 0382309b51..449d0b537c 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -90,6 +90,7 @@ static const AVOption options[] = { { "encryption_key", "The media encryption key (hex)", offsetof(MOVMuxContext, encryption_key), AV_OPT_TYPE_BINARY, .flags = AV_OPT_FLAG_ENCODING_PARAM }, { "encryption_kid", "The media encryption key identifier (hex)", offsetof(MOVMuxContext, encryption_kid), AV_OPT_TYPE_BINARY, .flags = AV_OPT_FLAG_ENCODING_PARAM }, { "use_stream_ids_as_track_ids", "use stream ids as track ids", offsetof(MOVMuxContext, use_stream_ids_as_track_ids), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, + { "write_tmcd", "force or disable writing tmcd", offsetof(MOVMuxContext, write_tmcd), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; @@ -2312,7 +2313,7 @@ static int mov_write_minf_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext } else if (track->tag == MKTAG('r','t','p',' ')) { mov_write_hmhd_tag(pb); } else if (track->tag == MKTAG('t','m','c','d')) { - if (track->mode == MODE_MP4) + if (track->mode != MODE_MOV) mov_write_nmhd_tag(pb); else mov_write_gmhd_tag(pb, track); @@ -5539,7 +5540,8 @@ static int mov_write_header(AVFormatContext *s) } } - if (mov->mode == MODE_MOV || mov->mode == MODE_MP4) { + if ( mov->write_tmcd == -1 && (mov->mode == MODE_MOV || mov->mode == MODE_MP4) + || mov->write_tmcd == 1) { tmcd_track = mov->nb_streams; /* +1 tmcd track for each video stream with a timecode */ |