libcamera: control_serializer: Accept empty ControlList
Accept empty `ControlList`s without an info map. Serialization
supports `ControlList`s without an associated `ControlInfoMap`
object. However, for deserialization, a "v4l2" control list
without an info map resulted in a fatal error.
After 30114cadd8 ("ipa: rpi: Defer initialising AF LensPosition ControlInfo and value")
the `lensControls` member of `ipa::RPi::ConfigResult` is left empty
and without an info map in every case, not just when a lens is not present.
This causes the above assertion to trigger every single time.
Also fix the indefinite article of "a ControlInfoMap" in the
error message.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -601,8 +601,10 @@ ControlList ControlSerializer::deserialize<ControlList>(ByteStreamBuffer &buffer
|
||||
|
||||
case IPA_CONTROL_ID_MAP_V4L2:
|
||||
default:
|
||||
LOG(Serializer, Fatal)
|
||||
<< "A list of V4L2 controls requires an ControlInfoMap";
|
||||
if (hdr->entries > 0)
|
||||
LOG(Serializer, Fatal)
|
||||
<< "A list of V4L2 controls requires a ControlInfoMap";
|
||||
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user