[mirotalksfu] - #194 Add missing

هذا الالتزام موجود في:
Miroslav Pejic
2025-02-22 21:41:58 +01:00
الأصل f3c8f1a669
التزام ce9997766c

عرض الملف

@@ -92,9 +92,6 @@ class VirtualBackground {
} }
async processStreamWithSegmentation(videoTrack, maskHandler) { async processStreamWithSegmentation(videoTrack, maskHandler) {
// Stop any existing processor before starting a new one
await this.stopCurrentProcessor();
// Initialize segmentation if not already done // Initialize segmentation if not already done
await this.initializeSegmentation(); await this.initializeSegmentation();
@@ -176,8 +173,9 @@ class VirtualBackground {
cleanPendingFrames() { cleanPendingFrames() {
// Close all pending frames to release resources // Close all pending frames to release resources
while (this.pendingFrames.length) { while (this.pendingFrames.length) {
const { videoFrame } = this.pendingFrames.pop(); const { videoFrame, imageBitmap } = this.pendingFrames.pop();
videoFrame?.close(); videoFrame?.close();
imageBitmap?.close();
} }
} }