mirror of https://github.com/vladmandic/human
web worker fix
parent
4fb51ad583
commit
e4a85fcb85
|
@ -269,7 +269,7 @@ function webWorker(input, image, canvas, timestamp) {
|
|||
});
|
||||
}
|
||||
// pass image data as arraybuffer to worker by reference to avoid copy
|
||||
worker.postMessage({ image: image.data.buffer, width: canvas.width, height: canvas.height, userConfig }, 'Human', [image.data.buffer]);
|
||||
worker.postMessage({ image: image.data.buffer, width: canvas.width, height: canvas.height, userConfig }, [image.data.buffer]);
|
||||
}
|
||||
|
||||
// main processing function when input is webcam, can use direct invocation or web worker
|
||||
|
|
|
@ -24,6 +24,6 @@ onmessage = async (msg) => {
|
|||
}
|
||||
// must strip canvas from return value as it cannot be transfered from worker thread
|
||||
if (result.canvas) result.canvas = null;
|
||||
postMessage({ result }, 'Human');
|
||||
postMessage({ result });
|
||||
busy = false;
|
||||
};
|
||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
|||
Subproject commit 43425df86424e9b5f4bec3510f3565963255d4a9
|
||||
Subproject commit d24d9fb46e8951284fafe55545c78a02df271c98
|
Loading…
Reference in New Issue