[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Fix uninitialised watchdogDuration_

Naushir Patuck naush at raspberrypi.com
Wed Apr 6 16:53:14 CEST 2022


Hi Umang,

Thank you for fixing this.  Sorry I did not spot it earlier.

On Wed, 6 Apr 2022 at 15:46, Umang Jain <umang.jain at ideasonboard.com> wrote:

> Initialise the watchdogDuration_ member to 0ms before it is used
> in rest of the code base. Failing to do so, spews out log warnings
> regarding dequeue timer being expired.
>
> Fixes: 16f3d2de50ff ("libcamera: v4l2_videodevice: Add a dequeue timer")
> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
>

Reviewed-by: Naushir Patuck <naush at raspberrypi.com>


> ---
>  src/libcamera/v4l2_videodevice.cpp | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/v4l2_videodevice.cpp
> b/src/libcamera/v4l2_videodevice.cpp
> index 634ac4a5..8e0afffe 100644
> --- a/src/libcamera/v4l2_videodevice.cpp
> +++ b/src/libcamera/v4l2_videodevice.cpp
> @@ -39,6 +39,8 @@
>
>  namespace libcamera {
>
> +using namespace std::literals::chrono_literals;
> +
>  LOG_DECLARE_CATEGORY(V4L2)
>
>  /**
> @@ -520,7 +522,8 @@ const std::string V4L2DeviceFormat::toString() const
>   */
>  V4L2VideoDevice::V4L2VideoDevice(const std::string &deviceNode)
>         : V4L2Device(deviceNode), formatInfo_(nullptr), cache_(nullptr),
> -         fdBufferNotifier_(nullptr), state_(State::Stopped)
> +         fdBufferNotifier_(nullptr), state_(State::Stopped),
> +         watchdogDuration_(0ms)
>  {
>         /*
>          * We default to an MMAP based CAPTURE video device, however this
> will
> --
> 2.31.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20220406/3ced3525/attachment.htm>


More information about the libcamera-devel mailing list