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

Unified Diff: webrtc/common_video/video_frame.cc

Issue 1889443002: Delete method webrtc::VideoFrame::Reset. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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: webrtc/common_video/video_frame.cc
diff --git a/webrtc/common_video/video_frame.cc b/webrtc/common_video/video_frame.cc
index a30f658ea0eae9d246e952a87ff4fc3b73b36a23..9cd52f904038d111b6a3aa3b0e0904a9c61e36a6 100644
--- a/webrtc/common_video/video_frame.cc
+++ b/webrtc/common_video/video_frame.cc
@@ -29,11 +29,12 @@ int ExpectedSize(int plane_stride, int image_height, PlaneType type) {
return plane_stride * ((image_height + 1) / 2);
}
-VideoFrame::VideoFrame() {
- // Intentionally using Reset instead of initializer list so that any missed
- // fields in Reset will be caught by memory checkers.
- Reset();
-}
+VideoFrame::VideoFrame()
+ : video_frame_buffer_(nullptr),
+ timestamp_(0),
+ ntp_time_ms_(0),
+ render_time_ms_(0),
+ rotation_(kVideoRotation_0) {}
VideoFrame::VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
uint32_t timestamp,
@@ -139,14 +140,6 @@ void VideoFrame::ShallowCopy(const VideoFrame& videoFrame) {
rotation_ = videoFrame.rotation_;
}
-void VideoFrame::Reset() {
- video_frame_buffer_ = nullptr;
- timestamp_ = 0;
- ntp_time_ms_ = 0;
- render_time_ms_ = 0;
- rotation_ = kVideoRotation_0;
-}
-
uint8_t* VideoFrame::buffer(PlaneType type) {
return video_frame_buffer_ ? video_frame_buffer_->MutableData(type)
: nullptr;

Powered by Google App Engine
This is Rietveld 408576698