summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/ffmpeg/A01-mkv-forced-flag.patch13
-rw-r--r--libhb/muxavformat.c3
2 files changed, 15 insertions, 1 deletions
diff --git a/contrib/ffmpeg/A01-mkv-forced-flag.patch b/contrib/ffmpeg/A01-mkv-forced-flag.patch
new file mode 100644
index 000000000..e18590d50
--- /dev/null
+++ b/contrib/ffmpeg/A01-mkv-forced-flag.patch
@@ -0,0 +1,13 @@
+diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
+index cab43f4..8688616 100644
+--- a/libavformat/matroskaenc.c
++++ b/libavformat/matroskaenc.c
+@@ -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,
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index 13f9e9832..389277319 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -776,7 +776,8 @@ static int avformatInit( hb_mux_object_t * m )
if ( ii == subtitle_default )
{
- track->st->disposition |= AV_DISPOSITION_DEFAULT;
+ track->st->disposition |= AV_DISPOSITION_DEFAULT |
+ AV_DISPOSITION_FORCED;
}
lang = lookup_lang_code(job->mux, subtitle->iso639_2 );