From 8a5c7dde8f36fd216a4524a34a600546860e980b Mon Sep 17 00:00:00 2001 From: Rob Walch Date: Mon, 19 Feb 2024 18:10:10 -0800 Subject: [PATCH] Reduce length of ESDS box guard statement --- src/utils/mp4-tools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/mp4-tools.ts b/src/utils/mp4-tools.ts index 14a25a366ce..ddef8846953 100644 --- a/src/utils/mp4-tools.ts +++ b/src/utils/mp4-tools.ts @@ -327,7 +327,7 @@ function parseStsd(stsd: Uint8Array): { codec: string; encrypted: boolean } { case 'mp4a': { const codecBox = findBox(sampleEntries, [fourCC])[0]; const esdsBox = findBox(codecBox.subarray(28), ['esds'])[0]; - if (esdsBox && esdsBox.length > 12) { + if (esdsBox && esdsBox.length > 7) { let i = 4; // ES Descriptor tag if (esdsBox[i++] !== 0x03) {