Skip to content

Commit e061795

Browse files
committed
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
1 parent c592e8e commit e061795

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libs/gui/SurfaceTextureClient.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,12 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
219219
if (i < 0) {
220220
return i;
221221
}
222-
mSurfaceTexture->queueBuffer(i, timestamp,
222+
status_t err = mSurfaceTexture->queueBuffer(i, timestamp,
223223
&mDefaultWidth, &mDefaultHeight, &mTransformHint);
224-
return OK;
224+
if (err != OK) {
225+
LOGE("queueBuffer: error queuing buffer to SurfaceTexture, %d", err);
226+
}
227+
return err;
225228
}
226229

227230
int SurfaceTextureClient::query(int what, int* value) const {

0 commit comments

Comments
 (0)