From 2cd22ad2367de7a92a323db351b7096ae9fbcade Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Fri, 5 Jan 2024 15:51:39 +0100 Subject: [PATCH] fix: Fix "maxImages (3) has already been acquired" error (#2352) --- .../src/main/java/com/mrousavy/camera/core/CameraSession.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt b/package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt index 7f2e8dd..0b48e08 100644 --- a/package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt +++ b/package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt @@ -298,7 +298,7 @@ class CameraSession(private val context: Context, private val cameraManager: Cam val imageFormat = ImageFormat.JPEG val sizes = characteristics.getPhotoSizes(imageFormat) val size = sizes.closestToOrMax(format?.photoSize) - val maxImages = 3 + val maxImages = 10 Log.i(TAG, "Adding ${size.width} x ${size.height} Photo Output in Format #$imageFormat...") val imageReader = ImageReader.newInstance(size.width, size.height, imageFormat, maxImages)