{"id":13770,"url":"https://patchwork.libcamera.org/api/patches/13770/?format=json","web_url":"https://patchwork.libcamera.org/patch/13770/","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":"<20210908135706.419622-1-vedantparanjape160201@gmail.com>","date":"2021-09-08T13:57:06","name":"[libcamera-devel,v3] test: gstreamer: Fix the destructor of GstreamerTest base class","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"48d6803c9d5718a15ef02e7bd6243f691f297e47","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/13770/mbox/","series":[{"id":2501,"url":"https://patchwork.libcamera.org/api/series/2501/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2501","date":"2021-09-08T13:57:06","name":"[libcamera-devel,v3] test: gstreamer: Fix the destructor of GstreamerTest base class","version":3,"mbox":"https://patchwork.libcamera.org/series/2501/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13770/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13770/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 070BABDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Sep 2021 13:57:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 90C6D6916E;\n\tWed,  8 Sep 2021 15:57:27 +0200 (CEST)","from mail-pg1-x529.google.com (mail-pg1-x529.google.com\n\t[IPv6:2607:f8b0:4864:20::529])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E08460503\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Sep 2021 15:57:26 +0200 (CEST)","by mail-pg1-x529.google.com with SMTP id q68so2683926pga.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 08 Sep 2021 06:57:26 -0700 (PDT)","from localhost.localdomain ([1.186.166.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb7sm2999399pgs.64.2021.09.08.06.57.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 08 Sep 2021 06:57:24 -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=\"fTldIK+o\"; 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=AIpkc8rBsWvS+SWUk+KFcID4cLtaHr2U9guZgA9iB20=;\n\tb=fTldIK+oepjz0+ch2r3D8qxs1BDv4vitbjfRdekwT1SDX+dcN3R9jeKdzbqi0i5gxe\n\tU0cAhOCwJvf8MwdJzMKaVoV28FfERiXcyYSQIRsfkS/yhQfvD+vP72BjeyfTqDeXoH1i\n\tLNdb8s9a75oAGBfs/YyWErnlSufGQnAzrwR+zmPpA93s2lOi0T89AUescE3GIXOFI5Hq\n\t8uhlECkAiTMQyzn1BPNKGgM25Z8stsXrLftnmGU2e57bYE7mvxMpEvAeECO3R6ESB5sA\n\tK0L5edlF82RYN1sEce/IBbuokByAO0cDcuCy7jdqkVSJPcJDLzVM57jrsFaqqL7fAHMI\n\tmeuw==","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=AIpkc8rBsWvS+SWUk+KFcID4cLtaHr2U9guZgA9iB20=;\n\tb=sdqLTD+Mc27+P9Whlp/8EcCk+aB4qZ4F1t80HFYJ69nTNIrcaBJevaoAse8QaIYO3D\n\ta5vOuPqeLVWjgrcNz4qfR4q2rU0UOxxQLSwAHOtsTjYAiQ58qDMJ4nxUy4kXlD5uxmA0\n\ttk9EfvpCc/4+BO3U6Rf18HqxwX3vLPkG5jgLb6HRDjbFgcCg1T+M+IrzaMF0zQ36wJ1q\n\t864H29XRmLeJny/d/q6bUrtbCo6bzCSL7kn9JoWGZ1XryLoBTYCIgKFPCxy8y2+KHWih\n\teiNiOm8SjYY0CGQn9Xkwc472Ac4G/aKK59ThCsJLJk1geM5qoWh+4KWstNoUuegEtR5l\n\tjTFw==","X-Gm-Message-State":"AOAM530zHly5o2HGightt2/1foSEOzDfdY7d9O7VwgWeieOOkk3IWDom\n\tHIJSsaaLIDiCx6hgsAecbDJmOc9A6RE9wEhS","X-Google-Smtp-Source":"ABdhPJx/5eTyLm+btoIU0m2JXZC2NpaWyLQRb7D2MHEQK9pM+TS8NoS6p0RAnUtF9dmnILWPdiQfqw==","X-Received":"by 2002:a63:1748:: with SMTP id 8mr3759444pgx.350.1631109444668; \n\tWed, 08 Sep 2021 06:57:24 -0700 (PDT)","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  8 Sep 2021 19:27:06 +0530","Message-Id":"<20210908135706.419622-1-vedantparanjape160201@gmail.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3] 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 | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)","diff":"diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\nindex dbdcaec0b111..e0f8de29cbd2 100644\n--- a/test/gstreamer/gstreamer_test.cpp\n+++ b/test/gstreamer/gstreamer_test.cpp\n@@ -69,12 +69,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+\tgst_clear_object(&pipeline_);\n+\tgst_clear_object(&libcameraSrc_);\n \n \tgst_deinit();\n }\n","prefixes":["libcamera-devel","v3"]}