Encrypted Media: Fix PpbBuffer::Destroy().
This CL makes the ownership of the pp::Buffer_Dev clear: 1) If the PpbBuffer owns the pp::Buffer_Dev, it always calls allocator_->Release() during the destructor so that the buffer is returned to the allocator_ and can be reused. 2) If TakeBufferDev() is called. PpbBuffer doesn't own the pp::Buffer_Dev any more. The caller of TakeBufferDev() needs to make sure allocator->Release() is called sometime later to return the buffer to allocator_. BUG=392497 TEST=Tested with random stream switch video. Review URL: https://codereview.chromium.org/374353004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282544 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment