Show a patch.

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

{
    "id": 13787,
    "url": "https://patchwork.libcamera.org/api/patches/13787/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13787/",
    "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": "<20210909131805.38786-1-vedantparanjape160201@gmail.com>",
    "date": "2021-09-09T13:18:05",
    "name": "[libcamera-devel,v5] test: gstreamer: Fix the destructor of GstreamerTest base class",
    "commit_ref": "0eea207b04ec2764fc4f2bafa1ec6df831a74573",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d6863d58416146049059aaa58941f97697971f8e",
    "submitter": {
        "id": 85,
        "url": "https://patchwork.libcamera.org/api/people/85/?format=api",
        "name": "Vedant Paranjape",
        "email": "vedantparanjape160201@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13787/mbox/",
    "series": [
        {
            "id": 2507,
            "url": "https://patchwork.libcamera.org/api/series/2507/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2507",
            "date": "2021-09-09T13:18:05",
            "name": "[libcamera-devel,v5] test: gstreamer: Fix the destructor of GstreamerTest base class",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/2507/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13787/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13787/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 60B88BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Sep 2021 13:18:23 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA0DB6916C;\n\tThu,  9 Sep 2021 15:18:22 +0200 (CEST)",
            "from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com\n\t[IPv6:2607:f8b0:4864:20::52f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 081DB6916B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Sep 2021 15:18:21 +0200 (CEST)",
            "by mail-pg1-x52f.google.com with SMTP id h3so904651pgb.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 09 Sep 2021 06:18:20 -0700 (PDT)",
            "from localhost.localdomain ([1.186.165.215])\n\tby smtp.googlemail.com with ESMTPSA id\n\tz131sm2389903pfc.159.2021.09.09.06.18.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 09 Sep 2021 06:18:18 -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=\"fCdtOC+1\"; 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=TLlkSHByNdK4JdqUsok/vin8/+cUFpQi1ZI4C0GyUwI=;\n\tb=fCdtOC+1c3sdPfQbgNRYKABwdbRY8RwhVOsgeYBGgYoqAiS2X38I6m7eGuVZCAdKEX\n\tAd8n18XXj8kANr56DzXtm9sp8y+gBvn69M9KAJczsDYsGdhOSFmLgHQI9Gj5fQ9SPrpv\n\tUWSis6U0F0A1517/yLluCNVOF7LvQcjg8jHMkJTM2cV9DQbULmOh//jgqmRhwASg1fFt\n\t11dzIsrLNs2F+s8ul0LqsKzasPOt5+H1VkogqwzIE4lrv1yz2HRY7MP0fqEaBhlbvVvI\n\tFbwRYl6oCFGEmPbCQXw9qPuEMHyLs5QPmxiHdQWFmyYyw8zCLCxSqlteYQC2QZS6axl3\n\tyX5Q==",
        "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=TLlkSHByNdK4JdqUsok/vin8/+cUFpQi1ZI4C0GyUwI=;\n\tb=AUkOjXpZfkOk6URB97rIQsnfmEdrc67qfNpZg56RlBJTLE6V34cswSqmoV+gC7aI4j\n\tSkMETKbYf0CzBwdpXs14/kX4QigpgsZhPLwC+/rX/sYQmq10gce13ODgvSejkceBJOF3\n\tp8aoPNxd2LrxIKPDx7/oLROdg3CUSqP6PIqTVwSL7D2GKlSpLt6D49gOFZSb7/WDiZkw\n\t30O45A5Uxrglb9Fx9Dua8VTQj41G3XOFq/SN/S9fBvBSmx6LgzSLJKYs1re8uqPI3GsT\n\tkH3OU+6gk1K7z+lXDpOY5sShRedZtUpkvZgyqTrI0fHVWmN+aT3I7jyAbTYhoG4vLLK+\n\tN3Iw==",
        "X-Gm-Message-State": "AOAM53351n+uhs4acF1D1Avnz2XGoSIDvA6tNP6Tee7h+BSneMflSUPy\n\tkZdk35ZAXxy9buB0mV9u2udzV8IyhC527+QR",
        "X-Google-Smtp-Source": "ABdhPJwtl4ifDPhRe9hL/XVQ6FrY72J8INLYUCkfpYwLMnPuxN+411EkfOaRBwKMoeIhPg8RwbSoXw==",
        "X-Received": "by 2002:a63:4d20:: with SMTP id\n\ta32mr2654085pgb.247.1631193499201; \n\tThu, 09 Sep 2021 06:18:19 -0700 (PDT)",
        "From": "Vedant Paranjape <vedantparanjape160201@gmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  9 Sep 2021 18:48:05 +0530",
        "Message-Id": "<20210909131805.38786-1-vedantparanjape160201@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5] 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 | 9 +++------\n 1 file changed, 3 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\nindex dbdcaec0b111..4171250584e6 100644\n--- a/test/gstreamer/gstreamer_test.cpp\n+++ b/test/gstreamer/gstreamer_test.cpp\n@@ -24,6 +24,7 @@ const char *__asan_default_options()\n }\n \n GstreamerTest::GstreamerTest()\n+\t: pipeline_(nullptr), libcameraSrc_(nullptr)\n {\n \t/*\n \t* GStreamer by default spawns a process to run the\n@@ -69,12 +70,8 @@ GstreamerTest::GstreamerTest()\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",
        "v5"
    ]
}