mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 23:09:45 +03:00
ipa: rpi: Prevent segfault if AGC algorithm is absent
Even without AGC definition in the tuning file, the application would still dereference agc unconditionally, leading to a segmentation fault if AGC is absent. This is relevant for sensors already providing AGC/AEC by themselves. Check if AGC is present prior to setting maximum exposure time. Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> # RPi4 + imx708_wide Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
5b7c83d8cc
commit
1ee330c058
1 changed files with 2 additions and 1 deletions
|
@ -1563,7 +1563,8 @@ void IpaBase::applyFrameDurations(Duration minFrameDuration, Duration maxFrameDu
|
|||
|
||||
RPiController::AgcAlgorithm *agc = dynamic_cast<RPiController::AgcAlgorithm *>(
|
||||
controller_.getAlgorithm("agc"));
|
||||
agc->setMaxExposureTime(maxExposureTime);
|
||||
if (agc)
|
||||
agc->setMaxExposureTime(maxExposureTime);
|
||||
}
|
||||
|
||||
void IpaBase::applyAGC(const struct AgcStatus *agcStatus, ControlList &ctrls)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue