Skip to content

Commit

Permalink
fix: Only parse/probe TS if the reference is not an MP4 and not WebM (#…
Browse files Browse the repository at this point in the history
…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).
  • Loading branch information
baconz authored Jun 29, 2023
1 parent 68f7a0e commit b1e7cc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b1e7cc4

Please sign in to comment.