I420VideoFrame: Remove function ResetSize

This is a partial reland of https://webrtc-codereview.appspot.com/39939004/.

The original CL was reverted because ViECapturer use ResetSize/IsZeroSize on |captured_frame_| as a check to make sure each captured frame is only delivered once. Removing ResetSize introduced a race condition where a captured frame could be delivered multiple times.

I have fixed this problem in this CL by replacing ResetSize with scoped_ptr::release.

BUG=4352
R=perkj@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39359004

Cr-Commit-Position: refs/heads/master@{#8561}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8561 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
magjed@webrtc.org
2015-03-02 17:33:26 +00:00
parent 43f4a47c28
commit 97ed2a4b70
9 changed files with 4 additions and 43 deletions

View File

@ -157,10 +157,6 @@ class I420VideoFrame {
// Return true if underlying plane buffers are of zero size, false if not.
virtual bool IsZeroSize() const;
// Reset underlying plane buffers sizes to 0. This function doesn't
// clear memory.
virtual void ResetSize();
// Return the handle of the underlying video frame. This is used when the
// frame is backed by a texture. The object should be destroyed when it is no
// longer in use, so the underlying resource can be freed.