Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: media/base/video_frame_unittest.cc

Issue 1227383003: Remove memset from VideoFrame and mark buffer as unpoisoned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dalecurtis@ comments. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/video_frame_unittest.cc
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index 24b8a2b4b5d4d23ddbae47adbd96e63def52356a..2a1bb946c88bfd89b775a9c28c6e7e650b96d169 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -331,7 +331,7 @@ TEST(VideoFrame,
EXPECT_EQ(release_sync_point, called_sync_point);
}
-TEST(VideoFrame, ZeroInitialized) {
+TEST(VideoFrame, InitializedAndZeroed) {
DaleCurtis 2015/07/09 23:29:44 Just move to the frame pool unittests?
emircan 2015/07/10 00:22:53 Done.
const int kWidth = 64;
const int kHeight = 48;
const base::TimeDelta kTimestamp = base::TimeDelta::FromMicroseconds(1337);
@@ -339,6 +339,7 @@ TEST(VideoFrame, ZeroInitialized) {
gfx::Size size(kWidth, kHeight);
scoped_refptr<media::VideoFrame> frame = VideoFrame::CreateFrame(
media::VideoFrame::YV12, size, gfx::Rect(size), size, kTimestamp);
+ memset(frame->data(0), 0, VideoFrame::AlignedAllocationSize(frame));
for (size_t i = 0; i < VideoFrame::NumPlanes(frame->format()); ++i)
EXPECT_EQ(0, frame->data(i)[0]);

Powered by Google App Engine
This is Rietveld 408576698