| Index: media/base/video_frame.cc
|
| diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
|
| index f80f9aa31004328acf531bb67c511c833f476bae..8cd2fd8273c2c6265619bcd12583b81391e81c7a 100644
|
| --- a/media/base/video_frame.cc
|
| +++ b/media/base/video_frame.cc
|
| @@ -805,6 +805,7 @@ VideoFrame::VideoFrame(VideoPixelFormat format,
|
| coded_size_(coded_size),
|
| visible_rect_(visible_rect),
|
| natural_size_(natural_size),
|
| + allocated_size_(0),
|
| shared_memory_handle_(base::SharedMemory::NULLHandle()),
|
| shared_memory_offset_(0),
|
| timestamp_(timestamp),
|
| @@ -895,11 +896,13 @@ void VideoFrame::AllocateYUV() {
|
|
|
| uint8* data = reinterpret_cast<uint8*>(
|
| base::AlignedAlloc(data_size, kFrameAddressAlignment));
|
| -
|
| for (size_t plane = 0; plane < NumPlanes(format_); ++plane)
|
| data_[plane] = data + offset[plane];
|
|
|
| AddDestructionObserver(base::Bind(&base::AlignedFree, data));
|
| +
|
| + // Make sure that allocated_size() returns the same size as allocated here.
|
| + allocated_size_ = data_size;
|
| }
|
|
|
| } // namespace media
|
|
|