OSDN Git Service

free all buffers when ANativeWindow::disconnect is called
authorMathias Agopian <mathias@google.com>
Tue, 9 Aug 2011 02:14:57 +0000 (19:14 -0700)
committerMathias Agopian <mathias@google.com>
Tue, 9 Aug 2011 03:25:45 +0000 (20:25 -0700)
Change-Id: Ie06e73e5b44398cda9e99876f78175b5eef765dc

libs/gui/SurfaceTexture.cpp

index 02b851c..eb50994 100644 (file)
@@ -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);