[PATCH v1] android: camera_device: Do not pass `nullptr` to `Request::addBuffer()`
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Jun 3 17:38:55 CEST 2025
Quoting Laurent Pinchart (2025-06-03 14:57:17)
> On Tue, Jun 03, 2025 at 03:45:35PM +0200, Barnabás Pőcze wrote:
> > The default argument already takes care of passing no fence to
> > `addBuffer()`, so there is no reason to specify `nullptr` explicitly.
> >
> > Signed-off-by: Barnabás Pőcze <barnabas.pocze at ideasonboard.com>
> > ---
> > src/android/camera_device.cpp | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> > index a038131ae..5dfa1fe22 100644
> > --- a/src/android/camera_device.cpp
> > +++ b/src/android/camera_device.cpp
> > @@ -1078,8 +1078,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques
> > FrameBuffer *frameBuffer = cameraStream->getBuffer();
> > buffer.internalBuffer = frameBuffer;
> >
> > - descriptor->request_->addBuffer(sourceStream->stream(),
> > - frameBuffer, nullptr);
> > + descriptor->request_->addBuffer(sourceStream->stream(), frameBuffer);
>
> I'd keep the original line wrap.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cleaner without the nullptr indeed.
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> >
> > requestedStreams.insert(sourceStream);
> > }
>
> --
> Regards,
>
> Laurent Pinchart
More information about the libcamera-devel
mailing list