ScreenCapturerMac: make sure the desktop frame is zero initiaziled

Fixes issues when using the display arrangement utility. The region
outside of the screens had random data when re-arranging displays
while capturing. This CL makes sure this region is always black.

Bug: webrtc:9703
Change-Id: I1481dd0f1b4584e75926755f9b8a6e5161cd5904
Reviewed-on: https://webrtc-review.googlesource.com/97184
Commit-Queue: Brave Yao <braveyao@webrtc.org>
Reviewed-by: Brave Yao <braveyao@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24589}
This commit is contained in:
Julien Isorce
2018-09-04 09:31:49 -07:00
committed by Commit Bot
parent 61c8bd4560
commit 05c6519eb9

View File

@ -98,7 +98,7 @@ void DesktopFrame::MoveFrameInfoFrom(DesktopFrame* other) {
BasicDesktopFrame::BasicDesktopFrame(DesktopSize size)
: DesktopFrame(size,
kBytesPerPixel * size.width(),
new uint8_t[kBytesPerPixel * size.width() * size.height()],
new uint8_t[kBytesPerPixel * size.width() * size.height()](),
nullptr) {}
BasicDesktopFrame::~BasicDesktopFrame() {