Bug 1880804 [wpt PR 44645] - Implement constructor in RTCEncodedVideoFrame, a=testonly
[gecko.git] / third_party / libwebrtc / moz-patch-stack / 0015.patch
blobc03e9ebadadca7345d6446196e515e0a24496c69
1 From: Dan Minor <dminor@mozilla.com>
2 Date: Thu, 31 Jan 2019 15:37:00 -0500
3 Subject: Bug 1524208 - Calculate stride based upon target_width in
4 video_capture_impl.cc; r=pehrsons
6 Differential Revision: https://phabricator.services.mozilla.com/D18270
7 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/51d12094d825c4c4467cb132d03d4f3cad4b1b82
8 ---
9 modules/video_capture/video_capture_impl.cc | 5 +++--
10 1 file changed, 3 insertions(+), 2 deletions(-)
12 diff --git a/modules/video_capture/video_capture_impl.cc b/modules/video_capture/video_capture_impl.cc
13 index 7071776d0a..02404697ad 100644
14 --- a/modules/video_capture/video_capture_impl.cc
15 +++ b/modules/video_capture/video_capture_impl.cc
16 @@ -180,8 +180,6 @@ int32_t VideoCaptureImpl::IncomingFrame(uint8_t* videoFrame,
20 - int stride_y = width;
21 - int stride_uv = (width + 1) / 2;
22 int target_width = width;
23 int target_height = abs(height);
25 @@ -194,6 +192,9 @@ int32_t VideoCaptureImpl::IncomingFrame(uint8_t* videoFrame,
29 + int stride_y = target_width;
30 + int stride_uv = (target_width + 1) / 2;
32 // Setting absolute height (in case it was negative).
33 // In Windows, the image starts bottom left, instead of top left.
34 // Setting a negative source height, inverts the image (within LibYuv).