Show a patch.

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

{
    "id": 15562,
    "url": "https://patchwork.libcamera.org/api/patches/15562/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15562/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20220327135258.1998-1-laurent.pinchart@ideasonboard.com>",
    "date": "2022-03-27T13:52:58",
    "name": "[libcamera-devel] gstreamer: Cleanup inner scope in gst_libcamera_src_task_run()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "0228de8acf53991761bc5d66c77eccc17dc90e93",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15562/mbox/",
    "series": [
        {
            "id": 3004,
            "url": "https://patchwork.libcamera.org/api/series/3004/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3004",
            "date": "2022-03-27T13:52:58",
            "name": "[libcamera-devel] gstreamer: Cleanup inner scope in gst_libcamera_src_task_run()",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3004/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15562/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15562/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 C5A79C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Mar 2022 13:53:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E7D7C65631;\n\tSun, 27 Mar 2022 15:53:06 +0200 (CEST)",
            "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 5A9E7600AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Mar 2022 15:53:05 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 783712EC;\n\tSun, 27 Mar 2022 15:53:04 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648389186;\n\tbh=pW2CuPhbOkJg8Raw+4awP+y1FL9ePnxjcoV0dOQqT00=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=O/pmHkVelHT7nkylkAVh3tBT3QkBSIix6rr0kHFWStuCfTBQZY9ZBUPOGG1HBKk+P\n\thLQ0FSuEqQ2dg+rsPoTayFLh2gr3YIAczkzhXSqnRDkrP97yWdSfsOSJm8R5FO27cN\n\tzoZ5QP2bIdVGeY27ocOjNI6Phj97STgRkUfam/9vLa9BYDHJp6HU520K46Udod9PFQ\n\t1MRGNKzkyi9So7LwqG+iQy4NTTEnP/MYGZlqBZJLUhQqHKD1Gk0P9GzrmnWuiFbk3j\n\t5H123zNUhsyHVj2PQrYtz5Fiv3KSmfo0iZZFznu+ER0b/vsi9UnTIND83Gqjent1mc\n\tjoCLe0QHoTE/g==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648389184;\n\tbh=pW2CuPhbOkJg8Raw+4awP+y1FL9ePnxjcoV0dOQqT00=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=O7+H0AIjeJbWtpuVMnSAfwd/zpEqJLnG5/JRy5ttd2UQ50N1Riyp3wj72l3CsqDMG\n\tN+/sCB3TQ8e4xFqYlvbq/snxE1e4EmrHnBU9VjOKy/RIycTg6tnt1iesDS0SNinjvP\n\t1Q/4Yd1a6g/988bkzojAR5IbE8j2GeyNqY8HoPWY="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"O7+H0AIj\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sun, 27 Mar 2022 16:52:58 +0300",
        "Message-Id": "<20220327135258.1998-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] gstreamer: Cleanup inner scope in\n\tgst_libcamera_src_task_run()",
        "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>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Cc": "Nicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tVedant Paranjape <vedantparanjape160201@gmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The code block that checks for flow errors in\ngst_libcamera_src_task_run() is located in an inner scope whose purpose\nit to handling locking. The flow error handling however occurs before\nthe lock is taken, so there's no need to place it in the inner scope.\nMove it one level up.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 26 +++++++++++++-------------\n 1 file changed, 13 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 46fd02d207be..8016a98d6a4d 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -311,21 +311,21 @@ gst_libcamera_src_task_run(gpointer user_data)\n \t\t\t\t\t\t\tsrcpad, ret);\n \t}\n \n-\t{\n-\t\tif (ret != GST_FLOW_OK) {\n-\t\t\tif (ret == GST_FLOW_EOS) {\n-\t\t\t\tg_autoptr(GstEvent) eos = gst_event_new_eos();\n-\t\t\t\tguint32 seqnum = gst_util_seqnum_next();\n-\t\t\t\tgst_event_set_seqnum(eos, seqnum);\n-\t\t\t\tfor (GstPad *srcpad : state->srcpads_)\n-\t\t\t\t\tgst_pad_push_event(srcpad, gst_event_ref(eos));\n-\t\t\t} else if (ret != GST_FLOW_FLUSHING) {\n-\t\t\t\tGST_ELEMENT_FLOW_ERROR(self, ret);\n-\t\t\t}\n-\t\t\tgst_task_stop(self->task);\n-\t\t\treturn;\n+\tif (ret != GST_FLOW_OK) {\n+\t\tif (ret == GST_FLOW_EOS) {\n+\t\t\tg_autoptr(GstEvent) eos = gst_event_new_eos();\n+\t\t\tguint32 seqnum = gst_util_seqnum_next();\n+\t\t\tgst_event_set_seqnum(eos, seqnum);\n+\t\t\tfor (GstPad *srcpad : state->srcpads_)\n+\t\t\t\tgst_pad_push_event(srcpad, gst_event_ref(eos));\n+\t\t} else if (ret != GST_FLOW_FLUSHING) {\n+\t\t\tGST_ELEMENT_FLOW_ERROR(self, ret);\n \t\t}\n+\t\tgst_task_stop(self->task);\n+\t\treturn;\n+\t}\n \n+\t{\n \t\t/*\n \t\t * Here we need to decide if we want to pause. This needs to\n \t\t * happen in lock step with the callback thread which may want\n",
    "prefixes": [
        "libcamera-devel"
    ]
}