Patch Detail
Show a patch.
GET /api/1.1/patches/1682/?format=api
{ "id": 1682, "url": "https://patchwork.libcamera.org/api/1.1/patches/1682/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1682/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20190713172351.25452-2-laurent.pinchart@ideasonboard.com>", "date": "2019-07-13T17:23:36", "name": "[libcamera-devel,v2,01/16] libcamera: camera: Don't move buffers away from request at completion", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5a2ba01c3ec716f4093c4cca242d1059efa0635f", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1682/mbox/", "series": [ { "id": 430, "url": "https://patchwork.libcamera.org/api/1.1/series/430/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=430", "date": "2019-07-13T17:23:35", "name": "Add support for external buffers", "version": 2, "mbox": "https://patchwork.libcamera.org/series/430/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1682/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1682/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4ABD66175B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Jul 2019 19:24:26 +0200 (CEST)", "from pendragon.ideasonboard.com (softbank126209254147.bbtec.net\n\t[126.209.254.147])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 214C52B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Jul 2019 19:24:24 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1563038666;\n\tbh=8keGl6+P+yeUQhUtgdMlPQu/yfmfkIQHGfk+bzLPOb4=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=RHpWHMFvBjR9O8LIbR5chNoOAd3sOd8xzaqn0hoTHpblUYRPnaveoeCFdIVQgruz8\n\tUnqlLH5n5eKz5KTr7YemZ7KnGF6VnAlYjXzTS9AjFIYo9zJMUC2rHlLF7qMCAceGvL\n\tjXKoRtyygxBfv6X+brXbSznSk8RJMliuux7H6H7o=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 13 Jul 2019 20:23:36 +0300", "Message-Id": "<20190713172351.25452-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190713172351.25452-1-laurent.pinchart@ideasonboard.com>", "References": "<20190713172351.25452-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 01/16] libcamera: camera: Don't move\n\tbuffers away from request at completion", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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>", "X-List-Received-Date": "Sat, 13 Jul 2019 17:24:26 -0000" }, "content": "For a historical reason that isn't fully understood, the request\ncompletion handler in the Camera class moves all buffers away from the\nrequest's buffer map to a local variable before emitting the request\ncompletion signal. There's no reason to do so, and it makes it\nimpossible for requests to access buffers in their destructor. Fix it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/camera.cpp | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 592dfd39eacc..094f1b63b7f1 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -894,8 +894,7 @@ int Camera::stop()\n */\n void Camera::requestComplete(Request *request)\n {\n-\tstd::map<Stream *, Buffer *> buffers(std::move(request->bufferMap_));\n-\trequestCompleted.emit(request, buffers);\n+\trequestCompleted.emit(request, request->bufferMap_);\n \tdelete request;\n }\n \n", "prefixes": [ "libcamera-devel", "v2", "01/16" ] }