From b0c15c9908d9e61554b04c7469b62618e7778167 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 8 Aug 2011 19:14:57 -0700 Subject: [PATCH] free all buffers when ANativeWindow::disconnect is called Change-Id: Ie06e73e5b44398cda9e99876f78175b5eef765dc --- libs/gui/SurfaceTexture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 02b851c95..eb509944d 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -599,6 +599,7 @@ status_t SurfaceTexture::disconnect(int api) { case NATIVE_WINDOW_API_CAMERA: if (mConnectedApi == api) { mConnectedApi = NO_CONNECTED_API; + freeAllBuffers(); } else { LOGE("disconnect: connected to another api (cur=%d, req=%d)", mConnectedApi, api);