Index: webrtc/media/webrtc/webrtcvideoengine2_unittest.cc |
diff --git a/webrtc/media/webrtc/webrtcvideoengine2_unittest.cc b/webrtc/media/webrtc/webrtcvideoengine2_unittest.cc |
index 6baa74b3b7b04d6be3d6d74c20c0d4293c1f4ecf..f12cc65124fa86f16c11b675527ab1067d8e2893 100644 |
--- a/webrtc/media/webrtc/webrtcvideoengine2_unittest.cc |
+++ b/webrtc/media/webrtc/webrtcvideoengine2_unittest.cc |
@@ -473,8 +473,8 @@ |
frame.width = 1280; |
frame.height = 720; |
frame.fourcc = cricket::FOURCC_I420; |
- frame.data_size = frame.width * frame.height + |
- 2 * ((frame.width + 1) / 2) * ((frame.height + 1) / 2); |
+ frame.data_size = static_cast<uint32_t>( |
+ cricket::VideoFrame::SizeOf(frame.width, frame.height)); |
rtc::scoped_ptr<char[]> data(new char[frame.data_size]); |
frame.data = data.get(); |
memset(frame.data, 1, frame.data_size); |