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

Unified Diff: webrtc/video_frame.h

Issue 2477233004: Update VideoFrameBuffer-related methods to not use references to scoped_refptr. (Closed)
Patch Set: Fix memory leak. Created 4 years, 1 month 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/video_frame.h
diff --git a/webrtc/video_frame.h b/webrtc/video_frame.h
index 05692788972e4cd07c5b2fb43a1c8a802690f3b5..bd6a85791f5a91b3d94969fdbc4144afd8583470 100644
--- a/webrtc/video_frame.h
+++ b/webrtc/video_frame.h
@@ -120,10 +120,7 @@ class VideoFrame {
// Return the underlying buffer. Never nullptr for a properly
// initialized VideoFrame.
- // Creating a new reference breaks the HasOneRef and IsMutable
- // logic. So return a const ref to our reference.
- const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer()
- const;
+ rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() const;
// Return true if the frame is stored in a texture.
bool is_texture() const {

Powered by Google App Engine
This is Rietveld 408576698