{"id":10410,"url":"https://patchwork.libcamera.org/api/patches/10410/?format=json","web_url":"https://patchwork.libcamera.org/patch/10410/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201112050243.32657-1-paul.elder@ideasonboard.com>","date":"2020-11-12T05:02:43","name":"[libcamera-devel] qcam: Clear the pool of free requests upon stopCapture()","commit_ref":"2d50b1664508e86e4d27b8620e74f8e82dfe1d57","pull_url":null,"state":"accepted","archived":false,"hash":"f3d963af697255dc76e4249c5ff2a15fb6c963c7","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10410/mbox/","series":[{"id":1456,"url":"https://patchwork.libcamera.org/api/series/1456/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1456","date":"2020-11-12T05:02:43","name":"[libcamera-devel] qcam: Clear the pool of free requests upon stopCapture()","version":1,"mbox":"https://patchwork.libcamera.org/series/1456/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10410/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10410/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 579A7BDB89\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Nov 2020 05:03:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D050F63139;\n\tThu, 12 Nov 2020 06:02:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F48B63139\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Nov 2020 06:02:58 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7CD4431A;\n\tThu, 12 Nov 2020 06:02:56 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tAMfFbkb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1605157377;\n\tbh=qViMzz6/DtwkO0gRPqAGU4m0cGUNIhSHxtBBcofeIeI=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=tAMfFbkblPFLgKR9aNt/wh5RQuZPs5lAAuEYhlqIRKE7IsnRZ2vzLXXZNSbhB4ryJ\n\t82SCyZBBVAd76abKHiqDlX6KTN4ia/6PlphtsKNjwAZ34ezbhJD8ZMaHfEQnhoj3v8\n\t6V7p1CJwIzjwmLRu1CiFpvFLSGX3IDrMKAVzdL0c=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 12 Nov 2020 14:02:43 +0900","Message-Id":"<20201112050243.32657-1-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH] qcam: Clear the pool of free requests\n\tupon stopCapture()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"To enable reusing Request objects, we kept a pool of free Requests. This\npool was not cleared upon stopping capture, however, which caused a\nsegfault when switching to another camera. Fix this by clearing the\nRequest pool on stopCapture().\n\nFixes: c753223ad6b9 (\"libcamera, android, cam, gstreamer, qcam, v4l2:\nReuse Request\")\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/qcam/main_window.cpp | 1 +\n 1 file changed, 1 insertion(+)","diff":"diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex f140313e..2502ecd4 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -579,6 +579,7 @@ void MainWindow::stopCapture()\n \tmappedBuffers_.clear();\n \n \trequests_.clear();\n+\tfreeQueue_.clear();\n \n \tdelete allocator_;\n \n","prefixes":["libcamera-devel"]}