Manta: libcamera2: prevent HAL crash when ZSL stream freed
This is a hardening band-aid to prevent HAL crash. Crash results in
Inaccessible camera hardware requiring a reboot of the device to recover.
NB: With Current GoogleCamera.app: Camera to Video switch, snapshots are
all green (blank). Workaround, switch to video mode, exit Camera application
and re-enter before running video where one expects to take snapshots as well.
Bug: 15408128
Change-Id: I1e6057069cace0e46e367f76f4a91f6b1f5459a5
diff --git a/libcamera2/ExynosCameraHWInterface2.cpp b/libcamera2/ExynosCameraHWInterface2.cpp
index a722a90..ffa2199 100644
--- a/libcamera2/ExynosCameraHWInterface2.cpp
+++ b/libcamera2/ExynosCameraHWInterface2.cpp
@@ -1944,6 +1944,7 @@
subParameters->height = height;
subParameters->format = *format_actual;
subParameters->svcPlanes = 1;
+ parentStream->m_parameters.streamOps =
subParameters->streamOps = stream_ops;
subParameters->usage = *usage;
subParameters->numOwnSvcBuffers = *max_buffers;
@@ -1982,6 +1983,7 @@
subParameters->height = height;
subParameters->format = *format_actual;
subParameters->svcPlanes = NUM_PLANES(*format_actual);
+ parentStream->m_parameters.streamOps =
subParameters->streamOps = stream_ops;
subParameters->usage = *usage;
subParameters->numOwnSvcBuffers = *max_buffers;