maybe support encoded cameras

This commit is contained in:
David Ventura
2024-07-10 12:35:52 +02:00
parent 9f6f0ca8fa
commit 58b795a86a
4 changed files with 92 additions and 2 deletions
+2 -1
View File
@@ -255,6 +255,7 @@ const deal_with_data = (session: Session, dv: DataView) => {
// retransmit
return;
}
if (session.curImage.length == 0) return; // missed the start-of-frame packet
let b = Buffer.from(data.buffer);
@@ -269,7 +270,7 @@ const deal_with_data = (session: Session, dv: DataView) => {
return;
}
if (session.curImage.length <= 1) return; // header does not have markers
if (session.curImage.length == 1) return; // header does not have markers
let lastFrameSlice = session.curImage[session.curImage.length - 1];
const lastResetMarker = findAllResetMarkers(lastFrameSlice).pop();