npm run format:write

This commit is contained in:
2024-12-25 23:15:10 -06:00
parent 83a0deab20
commit 67dbe076c3
3 changed files with 7 additions and 12 deletions
+3 -3
View File
@@ -97,12 +97,12 @@ export function decode(bytes: Uint8Array): DDPPacket {
dataLength,
};
let dataStart = 10
let dataStart = 10;
if (flags.timecode) {
if (bytes.length < 14) {
throw new Error('DDP packet with timecode must be at least 14 bytes');
}
dataStart = 14
dataStart = 14;
header.timecode = {
seconds: (bytes[10] << 8) + bytes[11],
fractionalSeconds: (bytes[12] << 8) + bytes[13],
@@ -111,6 +111,6 @@ export function decode(bytes: Uint8Array): DDPPacket {
return {
header,
data: bytes.subarray(dataStart)
data: bytes.subarray(dataStart),
};
}