Android: Fix texture leak.
The bug fix in https://codereview.webrtc.org/2033943004 was incomplete, and leaks the texture in the case of texture frames arriving during close. See also the similar bug fixed in https://codereview.webrtc.org/2012773004. BUG=webrtc:5966 R=perkj@webrtc.org, sakal@webrtc.org Review URL: https://codereview.webrtc.org/2044383002 . Cr-Commit-Position: refs/heads/master@{#13067}
This commit is contained in:
@ -261,6 +261,7 @@ void AndroidVideoCapturerJni::OnTextureFrame(int width,
|
||||
rtc::CritScope cs(&capturer_lock_);
|
||||
if (!capturer_) {
|
||||
LOG(LS_WARNING) << "OnTextureFrame() called for closed capturer.";
|
||||
surface_texture_helper_->ReturnTextureFrame();
|
||||
return;
|
||||
}
|
||||
int adapted_width;
|
||||
|
||||
Reference in New Issue
Block a user