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

Unified Diff: media/base/video_frame.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: Move unpoisoned inside ffmpeg_video_decoder. 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
« no previous file with comments | « no previous file | media/base/video_frame_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 2c3fefe1cfb898a2a8679a744bfe2e0a004a3c1a..51269a8b6076736e3b1c03e6fd7e46635901c956 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -856,11 +856,8 @@ void VideoFrame::AllocateYUV() {
DCHECK(IsValidPlane(kUPlane, format_));
data_size += strides_[kUPlane] + kFrameSizePadding;
- // FFmpeg expects the initialize allocation to be zero-initialized. Failure
- // to do so can lead to unitialized value usage. See http://crbug.com/390941
uint8* data = reinterpret_cast<uint8*>(
base::AlignedAlloc(data_size, kFrameAddressAlignment));
- memset(data, 0, data_size);
for (size_t plane = 0; plane < NumPlanes(format_); ++plane)
data_[plane] = data + offset[plane];
« no previous file with comments | « no previous file | media/base/video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698