Add unhandled throws

This commit is contained in:
Vanilagy
2026-01-20 08:49:49 +01:00
parent d859b39468
commit 98387258a4
+5 -1
View File
@@ -1303,6 +1303,10 @@ class MpegTsVideoTrackBacking extends MpegTsTrackBacking implements InputVideoTr
const codec = this.elementaryStream.info.codec;
const CHUNK_SIZE = 1024;
if (codec !== 'avc' && codec !== 'hevc') {
throw new Error('Unhandled.');
}
let packetStartPos: number | null = null;
while (true) {
@@ -1522,7 +1526,7 @@ class MpegTsAudioTrackBacking extends MpegTsTrackBacking implements InputAudioTr
context.seekTo(possibleHeaderStartPos + 1);
}
} else {
throw new Error('Unreachable');
throw new Error('Unhandled.');
}
}