Merge "SurfaceTexture: free buffers when disconnect fails" into ics-mr0

This commit is contained in:
Jamie Gennis 2011-10-19 11:06:05 -07:00 committed by Android (Google) Code Review
commit c9362e7b0f

View File

@ -409,9 +409,9 @@ int SurfaceTextureClient::connect(int api) {
int SurfaceTextureClient::disconnect(int api) {
LOGV("SurfaceTextureClient::disconnect");
Mutex::Autolock lock(mMutex);
freeAllBuffers();
int err = mSurfaceTexture->disconnect(api);
if (!err) {
freeAllBuffers();
mReqFormat = 0;
mReqWidth = 0;
mReqHeight = 0;