From 03d31ef39c18990a6fbdfad99c69084b60af7758 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 29 Dec 2019 03:56:34 +0100 Subject: avformat/matroskaenc: Remove special code for writing subtitles Once upon a time, mkv_write_block() only wrote a (Simple)Block, not a BlockGroup which is needed for subtitles to convey the duration. But with the introduction of support for writing BlockAdditions and DiscardPadding (both of which require a BlockGroup), mkv_write_block() can also open and close a BlockGroup of its own. This naturally led to some code duplication which is removed in this commit. This new code leads to one regression: It always uses eight bytes for the BlockGroup's length field, whereas the earlier code usually used the lowest amount of bytes needed. This will be fixed in a future commit. This temporary regression is also the reason for changes to the binsub-mksenc and matroska-zero-length-block fate tests. Signed-off-by: Andreas Rheinhardt --- tests/ref/fate/binsub-mksenc | 2 +- tests/ref/fate/matroska-zero-length-block | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/ref') diff --git a/tests/ref/fate/binsub-mksenc b/tests/ref/fate/binsub-mksenc index 184661a3f0..01e7db64f2 100644 --- a/tests/ref/fate/binsub-mksenc +++ b/tests/ref/fate/binsub-mksenc @@ -1 +1 @@ -490b1b4beb4a614c06004609039ce779 +9dd2ff92a3da9fb50405db3d05e41042 diff --git a/tests/ref/fate/matroska-zero-length-block b/tests/ref/fate/matroska-zero-length-block index 924cec1e3f..edee36a4ab 100644 --- a/tests/ref/fate/matroska-zero-length-block +++ b/tests/ref/fate/matroska-zero-length-block @@ -1,5 +1,5 @@ -f37ba7e8a30eaa33c1fd0ef77447fb41 *tests/data/fate/matroska-zero-length-block.matroska -636 tests/data/fate/matroska-zero-length-block.matroska +c09d3b89ed0795817d671deb041fca1b *tests/data/fate/matroska-zero-length-block.matroska +650 tests/data/fate/matroska-zero-length-block.matroska #tb 0: 1/1000 #media_type 0: subtitle #codec_id 0: subrip -- cgit v1.2.3