From patchwork Mon Jan 6 16:14:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2516 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A823E60463 for ; Mon, 6 Jan 2020 17:14:31 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4870E52F; Mon, 6 Jan 2020 17:14:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1578327271; bh=aVkREMBjCfFQ9bZNNQQ7PSwX1C8PJ4OR6HN2PishuO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u4tpHCaMOIo0Us+/3ryCFhznxcpgO9tMApvDY0iTniom9sAGmNRlbj279GF8e7vAm gblPy6gzI8Jf19tUNF607Va18NxWRY3K555VE3QOTbiaaB+kmdTmlDChVdMtTUiWHa /Es6jU9gLhOHkJa1009XFYC7HyM039H1I/CYcLN0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 6 Jan 2020 18:14:15 +0200 Message-Id: <20200106161417.19150-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106161417.19150-1-laurent.pinchart@ideasonboard.com> References: <20200106161417.19150-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] v4l2: camera_proxy: Return correct type from VIDIOC_G_FMT 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-List-Received-Date: Mon, 06 Jan 2020 16:14:31 -0000 The VIDIOC_G_FMT implementation overwrites the v4l2_format type field with 0. Fix it. Signed-off-by: Laurent Pinchart --- src/v4l2/v4l2_camera_proxy.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 2eeb12396d90..dd3ee3e6c6ff 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -229,6 +229,7 @@ int V4L2CameraProxy::vidioc_g_fmt(struct v4l2_format *arg) return -EINVAL; memset(&arg->fmt, 0, sizeof(arg->fmt)); + arg->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; arg->fmt.pix = curV4L2Format_.fmt.pix; return 0;