summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-16 19:49:16 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-22 04:14:26 +0100
commit053144008e4aff48678823eefbfa4d6dec21a3cc (patch)
treec406c346c5eb58c597c3fa6da55b96ba0f7a609f
parent48cf1d878cd2b777a26d3939eef43caac7ced406 (diff)
avformat/matroskaenc: Add support for FlagTextDescriptions
This is the Matroska equivalent of D_WEBVTT_DESCRIPTIONS and is therefore only enabled for subtitles. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavformat/matroskaenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index e5efba5408..2bfdb67308 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1359,6 +1359,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
av_log(s, AV_LOG_ERROR, "Subtitle codec %d is not supported.\n", par->codec_id);
return AVERROR(ENOSYS);
}
+ if (mkv->mode != MODE_WEBM && st->disposition & AV_DISPOSITION_DESCRIPTIONS)
+ put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGTEXTDESCRIPTIONS, 1);
if (mkv->mode != MODE_WEBM || par->codec_id != AV_CODEC_ID_WEBVTT)
native_id = MATROSKA_TRACK_TYPE_SUBTITLE;