diff mbox series

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

Message ID 20210217101356.1723370-14-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,01/19] fate/matroska: Add test for mastering display metadata
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 17, 2021, 10:13 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/matroskaenc.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

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