commit | 3b594bfe338d557b5bd57e9279ed5fc8d70ffea6 | [log] [tgz] |
---|---|---|
author | Eino-Ville Talvala <etalvala@google.com> | Mon Jul 31 09:57:15 2017 -0700 |
committer | Eino-Ville Talvala <etalvala@google.com> | Mon Jul 31 10:09:59 2017 -0700 |
tree | 8354aef605cfdf7420903640c1418d3f9b6f43f5 | |
parent | 6e269ec6fe9afd7a37b0bc4c67f1cc619eab32ef [diff] |
Camera2: Release input surface on capture session close Per the documentation, the input surface of a reprocessable capture session should be abandoned on the close of a session. Actually implement this, to avoid unintentional leaks of buffers. Test: Camera CTS passes Bug: 38313948 Change-Id: Ia45c39ea925288a5082d6e722ff4b40c55971a37
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java index 6825d36..c7654c9 100644 --- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -412,6 +412,9 @@ // If no sequences are pending, fire #onClosed immediately mSequenceDrainer.beginDrain(); } + if (mInput != null) { + mInput.release(); + } } /**