diff --git a/library/core/src/test/assets/mkv/full_blocks.mkv b/library/core/src/test/assets/mkv/full_blocks.mkv new file mode 100644 index 0000000000..e8855b621d Binary files /dev/null and b/library/core/src/test/assets/mkv/full_blocks.mkv differ diff --git a/library/core/src/test/assets/mkv/full_blocks.mkv.0.dump b/library/core/src/test/assets/mkv/full_blocks.mkv.0.dump new file mode 100644 index 0000000000..ac111d0c62 --- /dev/null +++ b/library/core/src/test/assets/mkv/full_blocks.mkv.0.dump @@ -0,0 +1,43 @@ +seekMap: + isSeekable = true + duration = 8901000 + getPosition(0) = [[timeUs=0, position=5401]] +numberOfTracks = 1 +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/x-subrip + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 1 + language = und + drmInitData = - + metadata = null + initializationData: + total output bytes = 213 + sample count = 3 + sample 0: + time = 0 + flags = 1 + data = length 59, hash A0217393 + sample 1: + time = 2345000 + flags = 1 + data = length 95, hash 4904F2 + sample 2: + time = 4567000 + flags = 1 + data = length 59, hash EFAB6D8A +tracksEnded = true diff --git a/library/core/src/test/assets/mkv/full_blocks.mkv.1.dump b/library/core/src/test/assets/mkv/full_blocks.mkv.1.dump new file mode 100644 index 0000000000..ac111d0c62 --- /dev/null +++ b/library/core/src/test/assets/mkv/full_blocks.mkv.1.dump @@ -0,0 +1,43 @@ +seekMap: + isSeekable = true + duration = 8901000 + getPosition(0) = [[timeUs=0, position=5401]] +numberOfTracks = 1 +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/x-subrip + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 1 + language = und + drmInitData = - + metadata = null + initializationData: + total output bytes = 213 + sample count = 3 + sample 0: + time = 0 + flags = 1 + data = length 59, hash A0217393 + sample 1: + time = 2345000 + flags = 1 + data = length 95, hash 4904F2 + sample 2: + time = 4567000 + flags = 1 + data = length 59, hash EFAB6D8A +tracksEnded = true diff --git a/library/core/src/test/assets/mkv/full_blocks.mkv.2.dump b/library/core/src/test/assets/mkv/full_blocks.mkv.2.dump new file mode 100644 index 0000000000..ac111d0c62 --- /dev/null +++ b/library/core/src/test/assets/mkv/full_blocks.mkv.2.dump @@ -0,0 +1,43 @@ +seekMap: + isSeekable = true + duration = 8901000 + getPosition(0) = [[timeUs=0, position=5401]] +numberOfTracks = 1 +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/x-subrip + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 1 + language = und + drmInitData = - + metadata = null + initializationData: + total output bytes = 213 + sample count = 3 + sample 0: + time = 0 + flags = 1 + data = length 59, hash A0217393 + sample 1: + time = 2345000 + flags = 1 + data = length 95, hash 4904F2 + sample 2: + time = 4567000 + flags = 1 + data = length 59, hash EFAB6D8A +tracksEnded = true diff --git a/library/core/src/test/assets/mkv/full_blocks.mkv.3.dump b/library/core/src/test/assets/mkv/full_blocks.mkv.3.dump new file mode 100644 index 0000000000..ac111d0c62 --- /dev/null +++ b/library/core/src/test/assets/mkv/full_blocks.mkv.3.dump @@ -0,0 +1,43 @@ +seekMap: + isSeekable = true + duration = 8901000 + getPosition(0) = [[timeUs=0, position=5401]] +numberOfTracks = 1 +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/x-subrip + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 1 + language = und + drmInitData = - + metadata = null + initializationData: + total output bytes = 213 + sample count = 3 + sample 0: + time = 0 + flags = 1 + data = length 59, hash A0217393 + sample 1: + time = 2345000 + flags = 1 + data = length 95, hash 4904F2 + sample 2: + time = 4567000 + flags = 1 + data = length 59, hash EFAB6D8A +tracksEnded = true diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java index 9c20a9668f..80eb33a46e 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java @@ -29,6 +29,11 @@ public final class MatroskaExtractorTest { ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/sample.mkv"); } + @Test + public void testMkvFullBlocksSample() throws Exception { + ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/full_blocks.mkv"); + } + @Test public void testWebmSubsampleEncryption() throws Exception { ExtractorAsserts.assertBehavior(