am 0a1b64fe: Merge "Release locked buffer when it fails to acquire graphics buffer"
* commit '0a1b64fe79f41eec5cebe8434ab30d93e2ea2724':
Release locked buffer when it fails to acquire graphics buffer
diff --git a/media/jni/android_media_ImageReader.cpp b/media/jni/android_media_ImageReader.cpp
index 0030dbd..d475eee 100644
--- a/media/jni/android_media_ImageReader.cpp
+++ b/media/jni/android_media_ImageReader.cpp
@@ -707,6 +707,7 @@
}
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;