]> git.sesse.net Git - ffmpeg/commitdiff
avformat/matroskaenc: Add support for FlagHearing/VisualImpaired
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 16 Feb 2021 18:14:06 +0000 (19:14 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 22 Feb 2021 03:13:17 +0000 (04:13 +0100)
Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskaenc.c

index c77f0a332b89d1a1460fc3447ec65aa2790083ca..e5efba54084272702a3cd1689f55739261254873 100644 (file)
@@ -1193,6 +1193,11 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
     } else {
         if (st->disposition & AV_DISPOSITION_COMMENT)
             put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGCOMMENTARY, 1);
+        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
         if (par->codec_id != AV_CODEC_ID_RAWVIDEO || par->codec_tag) {