[FFmpeg-devel] [PATCH 14/19] avformat/matroskaenc: Add support for FlagHearing/VisualImpaired

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Feb 17 12:13:51 EET 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/matroskaenc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 0dd093ae8b..86ffb51051 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1198,6 +1198,10 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
                             != (AV_DISPOSITION_ORIGINAL | AV_DISPOSITION_DUB))
             put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGORIGINAL,
                           !!(st->disposition & AV_DISPOSITION_ORIGINAL));
+        if (st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
+            put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGHEARINGIMPAIRED, 1);
+        if (st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
+            put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGVISUALIMPAIRED,  1);
 
         // look for a codec ID string specific to mkv to use,
         // if none are found, use AVI codes
-- 
2.27.0



More information about the ffmpeg-devel mailing list