Skip to content

Commit

Permalink
Fix error handling in X11 screen capturer
Browse files Browse the repository at this point in the history
Previusly errors from XServerPixelBuffer::CaptureRect() were not always
handled, which results in a black frame returned from the capturer
instead of an error.

BUG=webrtc:7305

Review-Url: https://codereview.webrtc.org/2738513005
Cr-Commit-Position: refs/heads/master@{#17101}
  • Loading branch information
SergeyUlanov authored and Commit bot committed Mar 8, 2017
1 parent b09b3f9 commit 9fa7e4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webrtc/modules/desktop_capture/screen_capturer_x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ std::unique_ptr<DesktopFrame> ScreenCapturerLinux::CaptureScreen() {
// Doing full-screen polling, or this is the first capture after a
// screen-resolution change. In either case, need a full-screen capture.
DesktopRect screen_rect = DesktopRect::MakeSize(frame->size());
x_server_pixel_buffer_.CaptureRect(screen_rect, frame.get());
if (!x_server_pixel_buffer_.CaptureRect(screen_rect, frame.get()))
return nullptr;
updated_region->SetRect(screen_rect);
}

Expand Down

0 comments on commit 9fa7e4a

Please sign in to comment.