Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a1b64fe authored by Zhijun He's avatar Zhijun He Committed by Gerrit Code Review
Browse files

Merge "Release locked buffer when it fails to acquire graphics buffer"

parents 3038046b 33477898
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -707,6 +707,7 @@ static jint ImageReader_imageSetup(JNIEnv* env, jobject thiz,
    }
    status_t res = consumer->lockNextBuffer(buffer);
    if (res != NO_ERROR) {
        ctx->returnLockedBuffer(buffer);
        if (res != BAD_VALUE /*no buffers*/) {
            if (res == NOT_ENOUGH_DATA) {
                return ACQUIRE_MAX_IMAGES;