From 406acfc38fba096311678ba322fed244c0efb219 Mon Sep 17 00:00:00 2001 From: olly Date: Fri, 20 Dec 2019 15:37:08 +0000 Subject: [PATCH] Relax MP4 sniffing to allow an atom to extend beyond the file length Issue: #6774 PiperOrigin-RevId: 286575797 --- .../com/google/android/exoplayer2/extractor/mp4/Sniffer.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Sniffer.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Sniffer.java index 95193785c0..dac74bfe2b 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Sniffer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Sniffer.java @@ -118,10 +118,6 @@ import java.io.IOException; } } - if (inputLength != C.LENGTH_UNSET && bytesSearched + atomSize > inputLength) { - // The file is invalid because the atom extends past the end of the file. - return false; - } if (atomSize < headerSize) { // The file is invalid because the atom size is too small for its header. return false;