From ce9997766c9361840197fc5991e46719e1be85a0 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Sat, 22 Feb 2025 21:41:58 +0100 Subject: [PATCH] [mirotalksfu] - #194 Add missing --- public/js/VirtualBackground.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/js/VirtualBackground.js b/public/js/VirtualBackground.js index f903962e..9f346a79 100644 --- a/public/js/VirtualBackground.js +++ b/public/js/VirtualBackground.js @@ -92,9 +92,6 @@ class VirtualBackground { } async processStreamWithSegmentation(videoTrack, maskHandler) { - // Stop any existing processor before starting a new one - await this.stopCurrentProcessor(); - // Initialize segmentation if not already done await this.initializeSegmentation(); @@ -176,8 +173,9 @@ class VirtualBackground { cleanPendingFrames() { // Close all pending frames to release resources while (this.pendingFrames.length) { - const { videoFrame } = this.pendingFrames.pop(); + const { videoFrame, imageBitmap } = this.pendingFrames.pop(); videoFrame?.close(); + imageBitmap?.close(); } }