fix: free screen and window capturers immediately after we're finished with them (#20156)

fix #17937, #19908
This commit is contained in:
loc 2019-09-17 12:48:31 -04:00 committed by Samuel Attard
parent 42999f42f2
commit d2a94e6b13
2 changed files with 9 additions and 7 deletions

View file

@ -144,6 +144,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
}
std::move(window_sources.begin(), window_sources.end(),
std::back_inserter(captured_sources_));
window_capturer_.reset();
}
if (capture_screen_ &&
@ -194,6 +195,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
// individual screen support is added.
std::move(screen_sources.begin(), screen_sources.end(),
std::back_inserter(captured_sources_));
screen_capturer_.reset();
}
if (!capture_window_ && !capture_screen_)