From 86c3eae9574ba1841b4c3ad0f3f5c9e2e4e1e4fc Mon Sep 17 00:00:00 2001 From: Siavash Sakhavi Date: Wed, 25 Apr 2018 18:53:58 +0800 Subject: [PATCH] Removed +1 from frame byte return (#205) --- .../main/java/com/otaliastudios/cameraview/FrameManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/FrameManager.java b/cameraview/src/main/java/com/otaliastudios/cameraview/FrameManager.java index d192de2a..7f9675ff 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/FrameManager.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/FrameManager.java @@ -88,6 +88,6 @@ class FrameManager { private int getBufferSize(int bitsPerPixel, Size previewSize) { long sizeInBits = previewSize.getHeight() * previewSize.getWidth() * bitsPerPixel; - return (int) Math.ceil(sizeInBits / 8.0d) + 1; + return (int) Math.ceil(sizeInBits / 8.0d); } }