Capture module: Fixing size computation for u and v planes

TEST=trybots

Review URL: https://webrtc-codereview.appspot.com/932017

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3070 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2012-11-09 18:45:12 +00:00
parent 06d72d881f
commit 701567a864

View File

@ -342,8 +342,8 @@ WebRtc_Word32 VideoCaptureImpl::IncomingFrameI420(
CriticalSectionScoped cs(&_callBackCs);
int size_y = video_frame.height * video_frame.y_pitch;
int size_u = video_frame.u_pitch * (video_frame.height + 1) / 2;
int size_v = video_frame.v_pitch * (video_frame.height + 1) / 2;
int size_u = video_frame.u_pitch * ((video_frame.height + 1) / 2);
int size_v = video_frame.v_pitch * ((video_frame.height + 1) / 2);
// TODO(mikhal): Can we use Swap here? This will do a memcpy.
int ret = _captureFrame.CreateFrame(size_y, video_frame.y_plane,
size_u, video_frame.u_plane,