[libcamera-devel] [PATCH 4/8] android: camera_device: Clear allocator at configureStream

Hirokazu Honda hiroh at chromium.org
Fri Sep 11 09:37:08 CEST 2020


Hi Jacopo.
Thanks for your patch.

On Thu, Sep 10, 2020 at 8:20 PM Niklas Söderlund
<niklas.soderlund at ragnatech.se> wrote:
>
> Hi Jacopo,
>
> Thanks for your patch.
>
> On 2020-09-09 17:54:53 +0200, Jacopo Mondi wrote:
> > The configureStream operation might be called by the Android framework
> > in two successive capture session without going through a close().
> >
> > Clear all the allocated buffers before configuring the camera streams.
> >
> > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
>

Reviewed-by: Hirokazu Honda <hiroh at chromium.org>

> > ---
> >  src/android/camera_device.cpp | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> > index 98cfa3d5aa59..d35c6b93b654 100644
> > --- a/src/android/camera_device.cpp
> > +++ b/src/android/camera_device.cpp
> > @@ -1187,6 +1187,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
> >        */
> >       streams_.clear();
> >       streams_.reserve(stream_list->num_streams);
> > +     allocator_.clear();
> >
> >       /* First handle all non-MJPEG streams. */
> >       camera3_stream_t *jpegStream = nullptr;
> > --
> > 2.28.0
> >
> > _______________________________________________
> > libcamera-devel mailing list
> > libcamera-devel at lists.libcamera.org
> > https://lists.libcamera.org/listinfo/libcamera-devel
>
> --
> Regards,
> Niklas Söderlund
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list