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

Andreas Rheinhardt git at videolan.org
Tue Mar 2 08:27:07 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Feb 16 18:53:55 2021 +0100| [9b06c4c10d2d642d4bdc03c3979dabecd2b810cc] | committer: Andreas Rheinhardt

avformat/matroskaenc: Add support for FlagOriginal

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

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

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

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



More information about the ffmpeg-cvslog mailing list