Index: webrtc/modules/desktop_capture/window_capturer_win.cc |
diff --git a/webrtc/modules/desktop_capture/window_capturer_win.cc b/webrtc/modules/desktop_capture/window_capturer_win.cc |
index d796d0f4fb651ac600044bc86becc47a73a2eb6f..0ca88cfa555a4c070176cdc074e57b4187ae533e 100644 |
--- a/webrtc/modules/desktop_capture/window_capturer_win.cc |
+++ b/webrtc/modules/desktop_capture/window_capturer_win.cc |
@@ -252,12 +252,12 @@ void WindowCapturerWin::CaptureFrame() { |
frame->mutable_updated_region()->SetRect( |
DesktopRect::MakeSize(frame->size())); |
- if (!result) { |
+ if (result) { |
+ callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); |
+ } else { |
LOG(LS_ERROR) << "Both PrintWindow() and BitBlt() failed."; |
- frame.reset(); |
+ callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); |
} |
- |
- callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); |
} |
} // namespace |