From 66378c63e6f1c51147f21d098a5568e0724c152d Mon Sep 17 00:00:00 2001 From: Pannag Sanketi Date: Fri, 2 Sep 2011 17:37:29 -0700 Subject: [PATCH] Error check in queuebuffer in SurfaceTextureClient In queuebuffer, if the surfacetexture returns an error, surfacetextureclient should check for that and pass on the error. Change-Id: Ie6d70e779fac0702f372eb4df5ecb655280875ee --- libs/gui/SurfaceTextureClient.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp index 710ef94b8..0bee0f17c 100644 --- a/libs/gui/SurfaceTextureClient.cpp +++ b/libs/gui/SurfaceTextureClient.cpp @@ -219,9 +219,12 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) { if (i < 0) { return i; } - mSurfaceTexture->queueBuffer(i, timestamp, + status_t err = mSurfaceTexture->queueBuffer(i, timestamp, &mDefaultWidth, &mDefaultHeight, &mTransformHint); - return OK; + if (err != OK) { + LOGE("queueBuffer: error queuing buffer to SurfaceTexture, %d", err); + } + return err; } int SurfaceTextureClient::query(int what, int* value) const {