OSDN Git Service

Write forced track flag to matroska files.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 27 Jan 2013 22:24:52 +0000 (23:24 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 27 Jan 2013 22:24:52 +0000 (23:24 +0100)
Based on a patch by Daniel Pielmeier, daniel pielmeier gmail
Fixes a part of ticket #1815.

libavformat/matroskaenc.c

index a34f485..c167c01 100644 (file)
@@ -572,6 +572,8 @@ static int mkv_write_tracks(AVFormatContext *s)
 
         if (st->disposition)
             put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGDEFAULT, !!(st->disposition & AV_DISPOSITION_DEFAULT));
+        if (st->disposition & AV_DISPOSITION_FORCED)
+            put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGFORCED, 1);
 
         // look for a codec ID string specific to mkv to use,
         // if none are found, use AVI codes