From b1e7cc4e67373d7ae7ab083fe5b626e28282e96b Mon Sep 17 00:00:00 2001 From: baconz Date: Thu, 29 Jun 2023 14:32:41 -0700 Subject: [PATCH] fix: Only parse/probe TS if the reference is not an MP4 and not WebM (#5381) We see a bunch of audio segments that probe as TS, and thus trigger warnings (and unnecessary work) in appendBuffer. There should never be an MP4 mime type that probes successfully as a TS, right? [Here's an example](https://prod.cdn-vdms.philo.com/live/EDME-VIACOM-PARAMOUNT-EAST-V2-R1/audio/128000/4946379595054.isma) fmp4 that probes as a TS (ignore the isma file extension). --- lib/media/media_source_engine.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/media/media_source_engine.js b/lib/media/media_source_engine.js index b83795d6d9..a3ecdef626 100644 --- a/lib/media/media_source_engine.js +++ b/lib/media/media_source_engine.js @@ -705,7 +705,8 @@ shaka.media.MediaSourceEngine = class { timestamp = startTime; } } - } else if (shaka.util.TsParser.probe(uint8ArrayData)) { + } else if (!mimeType.includes('/mp4') && !mimeType.includes('/webm') && + shaka.util.TsParser.probe(uint8ArrayData)) { const tsParser = new shaka.util.TsParser().parse(uint8ArrayData); const startTime = tsParser.getStartTime()[contentType]; if (startTime != null) {