{"id":13768,"url":"https://patchwork.libcamera.org/api/patches/13768/?format=json","web_url":"https://patchwork.libcamera.org/patch/13768/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210908120420.312959-1-vedantparanjape160201@gmail.com>","date":"2021-09-08T12:04:19","name":"[libcamera-devel,v1] test: gstreamer: Fix the destructor of GstreamerTest base class","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"3c3a622ef9b11c93bbd9fae3c74b90901d307601","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/?format=json","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13768/mbox/","series":[{"id":2499,"url":"https://patchwork.libcamera.org/api/series/2499/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2499","date":"2021-09-08T12:04:19","name":"[libcamera-devel,v1] test: gstreamer: Fix the destructor of GstreamerTest base class","version":1,"mbox":"https://patchwork.libcamera.org/series/2499/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13768/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13768/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 EB61FBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Sep 2021 12:04:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 56A8B6916E;\n\tWed,  8 Sep 2021 14:04:41 +0200 (CEST)","from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com\n\t[IPv6:2607:f8b0:4864:20::102f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1A0360503\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Sep 2021 14:04:39 +0200 (CEST)","by mail-pj1-x102f.google.com with SMTP id\n\tgp20-20020a17090adf1400b00196b761920aso1320928pjb.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 08 Sep 2021 05:04:39 -0700 (PDT)","from localhost.localdomain ([1.186.166.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\tz33sm2651601pga.20.2021.09.08.05.04.36\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 08 Sep 2021 05:04:37 -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=\"KAd1ZQNj\"; 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=KBxyX/td3r8q0BFCgeoB8SJRsrxGbH4GmteP2dNg3J8=;\n\tb=KAd1ZQNjeRtyEwdORQPeomun09D9inJiC+G1OhABok6s6/CSrifEGcrxuGMOs9J8O6\n\tfSEAACLpnAWuGy3H+Yxa7aNMxIivbdSp4N9ogzwmVDXYpcZ+jJuRpL0KrowW2avu55OJ\n\tcIEFQ2yRoY1mHWjLyRnbCWQuaODdWi0ShoZXdx202rTQwLa4pHaSk5zbYZX1xpjuepYP\n\toy/8yqUFosvqEOvVp3Q9VA7+493QaJaS/hwjSOM65lAYUDLIPNH4fXv9zdXlAvhnKe4g\n\toSmJX5/Q9j5Rp08ZncEjExjvMHio1oFLG7pyuXqPWwifiu1PRbh1uW6BZIGwCr/ZWmGK\n\tJZ7A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=KBxyX/td3r8q0BFCgeoB8SJRsrxGbH4GmteP2dNg3J8=;\n\tb=mj+uAo1WkZiF1nBx7qvFqbxTYc0CHLkzHB1xS4EB683cvDqVoFi+nypO07ycCAq7G1\n\td1GPAf9LooxpD/3R0oNWJh636vy/IjrpUs6BVVpxTz1FCrEEbW5+JbFFNvUsbux3ysTD\n\toc9/AjAtLaOlkHMtxwSmP0jjz0eJEzIf47iPU0zTV6RRvXEnH3VQIM72CnR0c6nEoT1e\n\tHzwApsXhPOjg908TS3mJYT5UP3ZLrRKCY7Dgc4TmrHyxucfDRWwPQZeF/SrX6XpVWIGm\n\tHgAQpMshkKXp/YnIgxyN6YDzPYxaa3lwlnVRVzGPAEklfbHPbosXSK4sT39+JdP6lYxY\n\t/UCA==","X-Gm-Message-State":"AOAM532LtQ4MQWlFJ40nZn7ySEj/lpU9Ym/tQcMs5MvTwHc0mOx2lO1c\n\t6D/ay0Xvzzpmd/xVzndrpf1pONBiClX8AA==","X-Google-Smtp-Source":"ABdhPJyUT6thjERpJHltZGWnxAvDBy1eHSVoZE0SZB/4FWRYhli8bqOzx95d0MglSnAk8pb6xqlPLw==","X-Received":"by 2002:a17:902:6848:b0:13a:4ffd:202e with SMTP id\n\tf8-20020a170902684800b0013a4ffd202emr2753774pln.79.1631102677789; \n\tWed, 08 Sep 2021 05:04:37 -0700 (PDT)","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  8 Sep 2021 17:34:19 +0530","Message-Id":"<20210908120420.312959-1-vedantparanjape160201@gmail.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1] 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":"Vedant 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>\n---\n test/gstreamer/gstreamer_test.cpp | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)","diff":"diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\nindex dbdcaec0b111..46fa5abaea75 100644\n--- a/test/gstreamer/gstreamer_test.cpp\n+++ b/test/gstreamer/gstreamer_test.cpp\n@@ -69,12 +69,10 @@ 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+\tif (libcameraSrc_)\n+\t\tgst_object_unref(libcameraSrc_);\n \n \tgst_deinit();\n }\n","prefixes":["libcamera-devel","v1"]}