From e4e3af642e03b57123c472ce743fdf8eb08e016a Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Wed, 16 Jun 2021 17:59:23 +0900 Subject: android: mm: cros_camera_buffer: Fix wrong indexing in plane() CameraBuffer::plane() should be accessed in zero based index. Fix the wrong indexing in CameraBuffer::plane() in cros_camera_buffer.cpp. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Paul Elder --- src/android/mm/cros_camera_buffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/android') diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp index 59e26d1b..c4157606 100644 --- a/src/android/mm/cros_camera_buffer.cpp +++ b/src/android/mm/cros_camera_buffer.cpp @@ -113,13 +113,13 @@ Span CameraBuffer::Private::plane(unsigned int plane) break; default: switch (plane) { - case 1: + case 0: addr = mem.ycbcr.y; break; - case 2: + case 1: addr = mem.ycbcr.cb; break; - case 3: + case 2: addr = mem.ycbcr.cr; break; } -- cgit v1.2.1