Show a patch.

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

{
    "id": 13786,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13786/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13786/",
    "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": "<20210909130733.25187-1-vedantparanjape160201@gmail.com>",
    "date": "2021-09-09T13:07:33",
    "name": "[libcamera-devel,v4] test: gstreamer: Fix the destructor of GstreamerTest base class",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c350a20d1fc3d85a375ea1ac123c2204f09263a4",
    "submitter": {
        "id": 85,
        "url": "https://patchwork.libcamera.org/api/1.1/people/85/?format=api",
        "name": "Vedant Paranjape",
        "email": "vedantparanjape160201@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13786/mbox/",
    "series": [
        {
            "id": 2506,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2506/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2506",
            "date": "2021-09-09T13:07:33",
            "name": "[libcamera-devel,v4] test: gstreamer: Fix the destructor of GstreamerTest base class",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2506/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13786/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13786/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 27CE1BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Sep 2021 13:08:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AB3216916C;\n\tThu,  9 Sep 2021 15:08:02 +0200 (CEST)",
            "from mail-pg1-x533.google.com (mail-pg1-x533.google.com\n\t[IPv6:2607:f8b0:4864:20::533])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A45576916B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Sep 2021 15:08:01 +0200 (CEST)",
            "by mail-pg1-x533.google.com with SMTP id s11so1709493pgr.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 09 Sep 2021 06:08:01 -0700 (PDT)",
            "from localhost.localdomain ([1.186.165.215])\n\tby smtp.googlemail.com with ESMTPSA id\n\tr2sm2733402pgn.8.2021.09.09.06.07.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 09 Sep 2021 06:07:59 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Yeu0I80D\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=RNcVsNiuRGfM5U/FE7vLul0fVgxpDRpJHjua7bU+6Qg=;\n\tb=Yeu0I80Dl5HGrgBET3nypkZjz/Qs4O9WcboqiK6/NWoUZXvdSxHnN0ejp8rkps9zwg\n\t1MMXlH+TCHl2ld114x5I4SsI2+5h3JBsuJNOjVw8u1LgjYJp1fgMrAiWQ4e5tCsKsu5k\n\tjIVBJOOsFneyRiMeRAOV9c2dGIck59sMIZ5ZMoznlQLX/x3SbRDyr79eE5/zvO+jssGc\n\tuNNaHWx1GVk+PX1VEuh5HvFPON7oU4FEK0kdIENXUJV4wT1CNnqm7mlOwgEBGjkH5o7P\n\tOtibkHwi/rjPPLbLPP8OTtn/Pm3wI7h8mbyyMezUWF0CvDtSC4FjD15+wbYZ94JzTqHs\n\txuyA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=RNcVsNiuRGfM5U/FE7vLul0fVgxpDRpJHjua7bU+6Qg=;\n\tb=ngBIlzOCdczkLNG2XqNkrT6SzjA5/KfJX6BpwJCN2W0thLfZxWAi3dN0mifiie+vvN\n\ttRPd1ZuaVsw4zhWimBN50gTngPCfVpHTw+DLUhnthmMlkHzpRVvaYH+pbORElPVuU8Mo\n\tQU4UIzJhxWE8L9/d1+O2IbUZ912F+/jkEuCpkWaRe+fDKVkb/rEN6dyhda5Idyn0TTXB\n\tTG3WuDt8/F4sD/B1Nf/Snfxuv5aXHLqWGasT7YKUrIbBPtLyKcqDW8rX/M8HpuJZrxJc\n\t9T3dnGaRyNf+Jbm4n2XhOJQ+z+5xSB5sPzX5cF6Fw4s8ykMx425HmbCnlKSq5h3MlTFt\n\t1a9Q==",
        "X-Gm-Message-State": "AOAM532sEWxMz0Vg0DFfltdQIYdKF+mxO7M0bbFKg8WZQRQTc2SSPgsP\n\tft7D7eEp1Qhg/knfDoSLGzf6aJfFadXGoWOK",
        "X-Google-Smtp-Source": "ABdhPJwI9BnX/30ziqF+QqeX4YuIxKyGEk/+fJQPOQg2vvvAFKhMUmqoC5cN5EmUhMjCK5dHO/MVWA==",
        "X-Received": "by 2002:a63:350:: with SMTP id 77mr2590759pgd.441.1631192879546; \n\tThu, 09 Sep 2021 06:07:59 -0700 (PDT)",
        "From": "Vedant Paranjape <vedantparanjape160201@gmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  9 Sep 2021 18:37:33 +0530",
        "Message-Id": "<20210909130733.25187-1-vedantparanjape160201@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4] test: gstreamer: Fix the destructor of\n\tGstreamerTest base class",
        "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>",
        "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 destructor tried to check if pipeline_ is a parent of libcameraSrc_.\nThis was needed to be checked as if it is, cleanup of libcameraSrc_\nwould be handled by pipeline itself.\n\nSince, the destructor can be called anytime, even when pipeline_ hasn't\nbeen created, the use of pipeline_ to check if libcameraSrc_ has an\nancestor as pipeline_ caused a segmentation fault.\n\nFixes: f58768092277 (\"test: gstreamer: Fix the destructor of GstreamerTest base class\")\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/gstreamer/gstreamer_test.cpp | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\nindex dbdcaec0b111..7dcb3c5c2869 100644\n--- a/test/gstreamer/gstreamer_test.cpp\n+++ b/test/gstreamer/gstreamer_test.cpp\n@@ -64,17 +64,16 @@ GstreamerTest::GstreamerTest()\n \t\treturn;\n \t}\n \n+\tpipeline_ = nullptr;\n+\tlibcameraSrc_ = nullptr;\n+\n \tstatus_ = TestPass;\n }\n \n GstreamerTest::~GstreamerTest()\n {\n-\tif (libcameraSrc_ &&\n-\t    !gst_object_has_as_ancestor(GST_OBJECT(libcameraSrc_),\n-\t\t\t\t\tGST_OBJECT(pipeline_)))\n-\t\tgst_object_unref(libcameraSrc_);\n-\tif (pipeline_)\n-\t\tgst_object_unref(pipeline_);\n+\tg_clear_object(&pipeline_);\n+\tg_clear_object(&libcameraSrc_);\n \n \tgst_deinit();\n }\n",
    "prefixes": [
        "libcamera-devel",
        "v4"
    ]
}