From ee9d41a4395af829c5c55c2f85b9f778bf9eba81 Mon Sep 17 00:00:00 2001 From: Joe Downing Date: Wed, 24 Aug 2022 13:41:17 -0700 Subject: [PATCH] Remove workaround for libyuv::CopyPlane zero-height crash The libyuv fix for this issue was submitted > 2 months ago so it should be safe to remove the workaround from webrtc. Bug: chromium:1330019 Change-Id: Ibcf3818739673005e40d7ef9917c5f5692c50df4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272861 Commit-Queue: Joe Downing Reviewed-by: Alexander Cooper Cr-Commit-Position: refs/heads/main@{#37895} --- modules/desktop_capture/desktop_frame.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/desktop_capture/desktop_frame.cc b/modules/desktop_capture/desktop_frame.cc index 837cbfca89..d6f574588c 100644 --- a/modules/desktop_capture/desktop_frame.cc +++ b/modules/desktop_capture/desktop_frame.cc @@ -45,13 +45,9 @@ void DesktopFrame::CopyPixelsFrom(const uint8_t* src_buffer, RTC_CHECK(DesktopRect::MakeSize(size()).ContainsRect(dest_rect)); uint8_t* dest = GetFrameDataAtPos(dest_rect.top_left()); - // TODO(crbug.com/1330019): Temporary workaround for a known libyuv crash when - // the height or width is 0. Remove this once this change has been merged. - if (dest_rect.width() && dest_rect.height()) { - libyuv::CopyPlane(src_buffer, src_stride, dest, stride(), - DesktopFrame::kBytesPerPixel * dest_rect.width(), - dest_rect.height()); - } + libyuv::CopyPlane(src_buffer, src_stride, dest, stride(), + DesktopFrame::kBytesPerPixel * dest_rect.width(), + dest_rect.height()); } void DesktopFrame::CopyPixelsFrom(const DesktopFrame& src_frame,