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

Unified Diff: media/base/video_frame.h

Issue 1267003004: Revert to zero-initializing buffers for FFmpegVideoDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Returning 0 for default. 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
Index: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index 80169cbe822990ca487fa5993d12bc2c5a7aa0d0..de6ee073d7883fbebbe1a2f1bc74893fe625d267 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -297,6 +297,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
int stride(size_t plane) const;
+ // Returns the actual allocation size for a YUV frame that is created by
+ // CreateFrame() method.
+ size_t allocated_size() const { return allocated_size_; }
+
// Returns the number of bytes per row and number of rows for a given plane.
//
// As opposed to stride(), row_bytes() refers to the bytes representing
@@ -444,6 +448,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// strides can be negative.
int32 strides_[kMaxPlanes];
+ // Actual allocation size for a YUV frame with alignments and padding.
+ size_t allocated_size_;
miu 2015/08/04 20:16:22 This isn't needed. See comments below.
+
// Array of data pointers to each plane.
// TODO(mcasas): we don't know on ctor if we own |data_| or not. After
// refactoring VideoFrame, change to scoped_ptr<uint8, AlignedFreeDeleter>.

Powered by Google App Engine
This is Rietveld 408576698