[fix] destroy screen capturer only when clean up

This commit is contained in:
dijunkun
2025-05-27 10:17:25 +08:00
parent 6e69c37056
commit 67168f7735
2 changed files with 1 additions and 3 deletions

View File

@@ -210,6 +210,7 @@ int ScreenCapturerWgc::Stop() {
sessions_[i].running_ = false;
}
}
running_ = false;
return 0;
}

View File

@@ -336,9 +336,6 @@ int Render::StopScreenCapturer() {
if (screen_capturer_) {
LOG_INFO("Stop screen capturer")
screen_capturer_->Stop();
screen_capturer_->Destroy();
delete screen_capturer_;
screen_capturer_ = nullptr;
}
return 0;