[FFmpeg-cvslog] avformat/matroskaenc: Add support for FlagHearing/VisualImpaired

Andreas Rheinhardt git at videolan.org
Mon Feb 22 05:38:39 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Feb 16 19:14:06 2021 +0100| [f9ceb18f3b26d792522536d32838c6795b8df20d] | committer: Andreas Rheinhardt

avformat/matroskaenc: Add support for FlagHearing/VisualImpaired

Reviewed-by: Ridley Combs <rcombs at rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9ceb18f3b26d792522536d32838c6795b8df20d
---

 libavformat/matroskaenc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index c77f0a332b..e5efba5408 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -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) {



More information about the ffmpeg-cvslog mailing list