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

index 6c8c7130c0617e80a44ffe77dc307d6fe71b5eb3..c77f0a332b89d1a1460fc3447ec65aa2790083ca 100644 (file)
@@ -1191,6 +1191,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
 
         put_ebml_string(pb, MATROSKA_ID_CODECID, codec_id);
     } else {
+        if (st->disposition & AV_DISPOSITION_COMMENT)
+            put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGCOMMENTARY, 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) {