diff options
author | jstebbins <[email protected]> | 2014-10-29 18:03:23 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-10-29 18:03:23 +0000 |
commit | 24bdb195c353244937b17b25a21dfdcb4f3e16f7 (patch) | |
tree | e036797b690be0bfce0d6ec03360723ab7093576 /contrib | |
parent | bd0237b57d6d030e1211272f1c7cf2dfa5d8e01e (diff) |
libav: fix writing zero mkv blockduration element for subtitles
Zero means non-keyframe according to mkv spec and causes errors in mkvalidator
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6477 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ffmpeg/A09-matroskaenc-pgs-duration.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A09-matroskaenc-pgs-duration.patch b/contrib/ffmpeg/A09-matroskaenc-pgs-duration.patch new file mode 100644 index 000000000..9463905c8 --- /dev/null +++ b/contrib/ffmpeg/A09-matroskaenc-pgs-duration.patch @@ -0,0 +1,31 @@ +From dab79ea5cd01187567b1761aaf1c329926483786 Mon Sep 17 00:00:00 2001 +From: John Stebbins <[email protected]> +Date: Wed, 29 Oct 2014 10:54:44 -0700 +Subject: [PATCH] matroskaenc: Fix writing zero duration subtitles + +The matroska spec says blockduration == 0 means the frame is not a +keyframe. Since all subtitles are "keyframes", 0 blockduration should +not be written. + +Fixes mkvalidator error messages for PGS subtitles. +--- + libavformat/matroskaenc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c +index 4ec474d..628300b 100644 +--- a/libavformat/matroskaenc.c ++++ b/libavformat/matroskaenc.c +@@ -1487,7 +1487,8 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt) + mkv_blockgroup_size(pkt->size)); + duration = pkt->convergence_duration; + mkv_write_block(s, pb, MATROSKA_ID_BLOCK, pkt, 0); +- put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); ++ if (duration > 0) ++ put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); + end_ebml_master(pb, blockgroup); + } + +-- +1.9.3 + |