From patchwork Wed Apr 6 14:45:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15642 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 86CB4C3256 for ; Wed, 6 Apr 2022 14:46:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B91B6604B8; Wed, 6 Apr 2022 16:46:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649256378; bh=2GLdwRRDEr3EGhd57YeOvNRoXZU6VmcG/1KUhHNUwHo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=eJYSAgil0JBlITl2BQAOIHZ8lCGAdJE6xZs8YHKmPdnVzg9/dByCOUi6Bc9K6KRGu /qay/hbepFcao2PAMkvU78wCqYB7UVLzf3C2LqQq7qULv+CHpNi+VwJlID2aZoqs33 xmELFglgmD/bE0vflU+YawVJha6BI+REHZd3aADwjQSbyORB6dqpThRnhOKPxTxx7l xLdKhHerCjP3ylUawIg+oOPX9XCuMQmX0eR8I5TFYVTwp4dJYQojL+XZ9sncafxigp uXysyj6X410RpDOcSjvRmpa48li3GUQAOJMKR9kOdWPfaqHgFYqJkg+M7SnR5AQ/MH fhcd7RB6HqYNQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C000604B8 for ; Wed, 6 Apr 2022 16:46:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JCv76lzh"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [27.57.186.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9620B482; Wed, 6 Apr 2022 16:46:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1649256376; bh=2GLdwRRDEr3EGhd57YeOvNRoXZU6VmcG/1KUhHNUwHo=; h=From:To:Cc:Subject:Date:From; b=JCv76lzh/YMuunHvm5Dbd+Y9IMgUl1Wwy5Ui4eq4TT/Ue5dZFD5QBcRUZKMPXskIA XHOcRY3HTEOaD4hwELvYE1kCIvrKCIHqMCcAkmrHzlJEODFxGrZynL08KLfYnmZpDR Lynaf3BVdCBZLpba7WwelIo+oeY0u+ZL3AgXVUpw= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Apr 2022 20:15:53 +0530 Message-Id: <20220406144553.193858-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Fix uninitialised watchdogDuration_ X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- 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