From dbe4e0e9457c349ea6a797b62d5f55e15c67f642 Mon Sep 17 00:00:00 2001 From: Harvey Yang Date: Wed, 13 Sep 2023 15:20:50 +0000 Subject: android: camera_device: Fix requestedStream handling The Android CameraDevice class adds a sourceStream for each Mapped stream requested by the framework. When mapping multiple framework streams to the same sourceStream, the implementation of CameraDevice::processCaptureRequest wrongly erases the just added sourceStream from the list of streams to request to libcamera. Fix this by adding the stream instead of erasing it. Fixes: 7ea83eba0df6 ("android: camera_device: Postpone mapped streams handling") Signed-off-by: Harvey Yang Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- src/android/camera_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 1f7ce440..25cedd44 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1077,7 +1077,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques descriptor->request_->addBuffer(sourceStream->stream(), frameBuffer, nullptr); - requestedStreams.erase(sourceStream); + requestedStreams.insert(sourceStream); } /* -- cgit v1.2.1