From a16edeb3848c6e6693bfaa24c5eb1744c5d9c445 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Mon, 26 Oct 2020 17:19:05 +0000 Subject: libcamera: raspberrypi: Initialise the SensorCropMaximum property Initialise it to show we support its use, however, set it to all zeroes to indicate that it's not meaningful yet. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index dd62dfc7..763451a8 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -926,6 +926,13 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator) /* Initialize the camera properties. */ data->properties_ = data->sensor_->properties(); + /* + * Set a default value for the ScalerCropMaximum property to show + * that we support its use, however, initialise it to zero because + * it's not meaningful until a camera mode has been chosen. + */ + data->properties_.set(properties::ScalerCropMaximum, Rectangle{}); + /* * We cache three things about the sensor in relation to transforms * (meaning horizontal and vertical flips). -- cgit v1.2.1