OSDN Git Service

matroskaenc: Allow writing track "forced" flag
authorJohn Stebbins <stebbins@jetheaddev.com>
Tue, 24 Feb 2015 20:44:48 +0000 (12:44 -0800)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 24 Feb 2015 21:28:51 +0000 (22:28 +0100)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/matroskaenc.c

index cab43f4..8688616 100644 (file)
@@ -769,6 +769,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
     // if we need to clear it.
     if (!(st->disposition & AV_DISPOSITION_DEFAULT))
         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, !!(st->disposition & AV_DISPOSITION_FORCED));
 
     if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->initial_padding) {
         mkv->tracks[i].ts_offset = av_rescale_q(codec->initial_padding,