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

Unified Diff: media/base/video_frame_pool_unittest.cc

Issue 1267003004: Revert to zero-initializing buffers for FFmpegVideoDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Zero initialize only the planes. Created 5 years, 4 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
« no previous file with comments | « media/base/video_frame_pool.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_pool_unittest.cc
diff --git a/media/base/video_frame_pool_unittest.cc b/media/base/video_frame_pool_unittest.cc
index 052b67737d2721d493d14472042993593e8c9c5b..2d0c1202a2c327a24432eccfb1b3a282993be58a 100644
--- a/media/base/video_frame_pool_unittest.cc
+++ b/media/base/video_frame_pool_unittest.cc
@@ -39,6 +39,14 @@ class VideoFramePoolTest : public ::testing::Test {
scoped_ptr<VideoFramePool> pool_;
};
+TEST_F(VideoFramePoolTest, FrameInitializedAndZeroed) {
+ scoped_refptr<VideoFrame> frame = CreateFrame(PIXEL_FORMAT_YV12, 10);
+
+ // Verify that frame is initialized with zeros.
+ for (size_t i = 0; i < VideoFrame::NumPlanes(frame->format()); ++i)
+ EXPECT_EQ(0, frame->data(i)[0]);
+}
+
TEST_F(VideoFramePoolTest, SimpleFrameReuse) {
scoped_refptr<VideoFrame> frame = CreateFrame(PIXEL_FORMAT_YV12, 10);
const uint8* old_y_data = frame->data(VideoFrame::kYPlane);
« no previous file with comments | « media/base/video_frame_pool.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698