Fix a race condition where Camera2Session forgot to return the texture frame when closing the camera.

BUG=b/31201445

Review-Url: https://codereview.webrtc.org/2289303005
Cr-Commit-Position: refs/heads/master@{#14015}
This commit is contained in:
sakal 2016-09-01 02:07:02 -07:00 committed by Commit bot
parent 26091b1118
commit 8a2098cb8d

View File

@ -176,6 +176,7 @@ public class Camera2Session implements CameraSession {
if (state != SessionState.RUNNING) {
Logging.d(TAG, "Texture frame captured but camera is no longer running.");
surfaceTextureHelper.returnTextureFrame();
return;
}