Show a patch.

GET /api/1.1/patches/19654/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 19654,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19654/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19654/",
    "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": "<20240310143023.752559-4-pobrn@protonmail.com>",
    "date": "2024-03-10T14:30:43",
    "name": "[v2,3/3] libcamera: framebuffer_allocator: Remove entry if allocation fails",
    "commit_ref": "2e2ba223f3a249f1c04fe88c2709ca6e7d42c242",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9bd387ccd8daaf2c4d9b6468714cc7b683c7fe88",
    "submitter": {
        "id": 133,
        "url": "https://patchwork.libcamera.org/api/1.1/people/133/?format=api",
        "name": "Pőcze Barnabás",
        "email": "pobrn@protonmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19654/mbox/",
    "series": [
        {
            "id": 4209,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4209/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4209",
            "date": "2024-03-10T14:30:38",
            "name": "couple FrameBufferAllocator changes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4209/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19654/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19654/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 88FB9BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 10 Mar 2024 14:30:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3657E628AC;\n\tSun, 10 Mar 2024 15:30:58 +0100 (CET)",
            "from mail-40133.protonmail.ch (mail-40133.protonmail.ch\n\t[185.70.40.133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C08A16286F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 10 Mar 2024 15:30:56 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"PNSKAEn4\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1710081056; x=1710340256;\n\tbh=h3XnFFQ3vTbXJhLHKU2T6xJhgZ8mmSIXCJ9+l1CKwp4=;\n\th=Date:To:From:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=PNSKAEn4Hsz9CkvYwh+zMWplnUtimYVVzb5AXuVb6jCVRcjvwsWJoSzumufEPzUOF\n\tOQO20ajCdfzy0+xZ2COquqZ5OGY4ROGWG9KkFD/boEZAQ6bxARvV6/EknW3mOSM8KL\n\tA0218PFbfhG0z1X1cOUB8FbaaA6ptR5bdXG6THQ8HC7cTDgW4w8Wz8dtMr5JFUzazm\n\tbZIwBGuQCePB2m3gTQ6Ykt7BMg4JyO58ncbqcxZ2qz8qAuuiH8lxdM2Ug9Hq+FAYGB\n\tB5tH4Bz3sidqP9clH0UPMdP8ZLZ1JHXfqmnO2HVDHKTlOX7/ThNj4y8P76A07GwgjS\n\txI1ODEDnSFaEA==",
        "Date": "Sun, 10 Mar 2024 14:30:43 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>",
        "Subject": "[PATCH v2 3/3] libcamera: framebuffer_allocator: Remove entry if\n\tallocation fails",
        "Message-ID": "<20240310143023.752559-4-pobrn@protonmail.com>",
        "In-Reply-To": "<20240310143023.752559-1-pobrn@protonmail.com>",
        "References": "<20240310143023.752559-1-pobrn@protonmail.com>",
        "Feedback-ID": "20568564:user:proton",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Remove the entry from the `buffers_` mapping if\n`Camera::exportFrameBuffers()` fails, otherwise\nthere would be a stale entry in the map.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n---\n src/libcamera/framebuffer_allocator.cpp | 4 ++++\n 1 file changed, 4 insertions(+)",
    "diff": "diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp\nindex fc19a33a..dbd0db19 100644\n--- a/src/libcamera/framebuffer_allocator.cpp\n+++ b/src/libcamera/framebuffer_allocator.cpp\n@@ -97,6 +97,10 @@ int FrameBufferAllocator::allocate(Stream *stream)\n \t\tLOG(Allocator, Error)\n \t\t\t<< \"Stream is not part of \" << camera_->id()\n \t\t\t<< \" active configuration\";\n+\n+\tif (ret < 0)\n+\t\tbuffers_.erase(it);\n+\n \treturn ret;\n }\n \n",
    "prefixes": [
        "v2",
        "3/3"
    ]
}