Index: webrtc/media/base/fakevideocapturer.h |
diff --git a/webrtc/media/base/fakevideocapturer.h b/webrtc/media/base/fakevideocapturer.h |
index 0a30469bfc3ec57da5793ae9f9b39d4d5c559e02..a5baf8ef3fde3dd47d536837317276f3b7c33d50 100644 |
--- a/webrtc/media/base/fakevideocapturer.h |
+++ b/webrtc/media/base/fakevideocapturer.h |
@@ -79,12 +79,11 @@ class FakeVideoCapturer : public cricket::VideoCapturer { |
return false; |
} |
// Currently, |fourcc| is always I420 or ARGB. |
- // TODO(fbarchard): Extend SizeOf to take fourcc. |
uint32_t size = 0u; |
if (fourcc == cricket::FOURCC_ARGB) { |
size = width * 4 * height; |
} else if (fourcc == cricket::FOURCC_I420) { |
- size = static_cast<uint32_t>(cricket::VideoFrame::SizeOf(width, height)); |
+ size = width * height + 2 * ((width + 1) / 2) * ((height + 1) / 2); |
} else { |
return false; // Unsupported FOURCC. |
} |