From 86468e3e1f1d2d64fd72282e9151e8e88b2d7193 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 23 Aug 2023 14:47:42 +0200 Subject: [PATCH] fix: Use direct `ByteBuffer` --- .../src/main/java/com/mrousavy/camera/frameprocessor/Frame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java b/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java index 98c3236..b9ea221 100644 --- a/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java +++ b/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java @@ -105,7 +105,7 @@ public class Frame { int totalSize = ySize + uSize + vSize; if (byteArrayCache == null) { - byteArrayCache = ByteBuffer.allocate(totalSize); + byteArrayCache = ByteBuffer.allocateDirect(totalSize); } byteArrayCache.rewind();