The 2x2 black frame on windows when the shared window is minimized caused an assert from vp8 and may lead to memroy corruption.
It's changed to 1x1 to match the behavior on Mac. The Chromium code will detect the size and convert it to a black frame in the original size. TBR=sergeyu@chromium.org BUG=crbug/414908 Review URL: https://webrtc-codereview.appspot.com/23709004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7214 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
5422e724d3
commit
d91608dd2d
@ -173,10 +173,10 @@ void WindowCapturerWin::Capture(const DesktopRegion& region) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return a 2x2 black frame if the window is minimized. The size is 2x2 so it
|
||||
// can be subsampled to I420 downstream.
|
||||
// Return a 1x1 black frame if the window is minimized, to match the behavior
|
||||
// on Mac.
|
||||
if (IsIconic(window_)) {
|
||||
BasicDesktopFrame* frame = new BasicDesktopFrame(DesktopSize(2, 2));
|
||||
BasicDesktopFrame* frame = new BasicDesktopFrame(DesktopSize(1, 1));
|
||||
memset(frame->data(), 0, frame->stride() * frame->size().height());
|
||||
|
||||
previous_size_ = frame->size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user