Fix some things

This commit is contained in:
Vanilagy
2026-01-12 11:59:37 +01:00
parent 91e7812fb2
commit 7b036fe8ac
3 changed files with 26 additions and 44 deletions
+3 -4
View File
@@ -154,11 +154,10 @@ export class MatroskaInputFormat extends InputFormat {
return false;
}
const dataSizeResult = readElementSize(headerSlice);
if (dataSizeResult === null || dataSizeResult.size === null) {
const dataSize = readElementSize(headerSlice);
if (typeof dataSize !== 'number') {
return false; // Miss me with that shit
}
const dataSize = dataSizeResult.size;
let dataSlice = input._reader.requestSlice(headerSlice.filePos, dataSize);
if (dataSlice instanceof Promise) dataSlice = await dataSlice;
@@ -172,7 +171,7 @@ export class MatroskaInputFormat extends InputFormat {
const { id, size } = header;
const dataStartPos = dataSlice.filePos;
if (size === null) return false;
if (size === undefined) return false;
switch (id) {
case EBMLId.EBMLVersion: {