Patch Detail
Show a patch.
GET /api/1.1/patches/12481/?format=api
{ "id": 12481, "url": "https://patchwork.libcamera.org/api/1.1/patches/12481/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12481/", "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": "<20210601192405.143591-1-vedantparanjape160201@gmail.com>", "date": "2021-06-01T19:24:05", "name": "[libcamera-devel,v2] gstreamer: Add error checking in gst_libcamera_src_task_enter()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6c1fec81dbc3281fd0e8e541b0454d7f2bce11fa", "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/12481/mbox/", "series": [ { "id": 2098, "url": "https://patchwork.libcamera.org/api/1.1/series/2098/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2098", "date": "2021-06-01T19:24:05", "name": "[libcamera-devel,v2] gstreamer: Add error checking in gst_libcamera_src_task_enter()", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2098/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12481/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12481/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 3F101C3205\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 1 Jun 2021 19:24:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73DDA68922;\n\tTue, 1 Jun 2021 21:24:29 +0200 (CEST)", "from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com\n\t[IPv6:2607:f8b0:4864:20::102a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE5E26891F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 1 Jun 2021 21:24:27 +0200 (CEST)", "by mail-pj1-x102a.google.com with SMTP id\n\td5-20020a17090ab305b02901675357c371so1709095pjr.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 01 Jun 2021 12:24:27 -0700 (PDT)", "from localhost.localdomain ([1.186.76.76])\n\tby smtp.googlemail.com with ESMTPSA id\n\tv20sm7518066pgc.42.2021.06.01.12.24.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 01 Jun 2021 12:24:25 -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=\"QqSh1imW\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=MdhfF88Fb90w3ObISPFTLCeyM6NQNh1XntsiXhbQZ0Y=;\n\tb=QqSh1imWNJyy8a25xyrSvfk8bCZhPU6HEUhrKk1zfvtyfegoeNqwtqCOMyY3h5EIDT\n\tmE3mFp/CkvUie1pGjkgwa4dj2XdVv6U7Wh5KJ62i4AutJSmvcN0tbOfJKD+kDr/TULnA\n\tkDTuHf+Mf8FAAZCVVhwW5k20PqbWNImU6diiy8+l6kg/P34hUHy4JpynkRLy404oJl5J\n\t9VdLzFardweqP9C9nxjeMVpTxtK7VpcvuhGFBbyHFAGaNkoGui1AJawEhWmXqme6jR1n\n\tKAuKqd6opg59wQOWzSxcCcJz9C2pm5/SQEz0De9y/MdjXOGTjmsSLpwd3VKrDACP79md\n\tbmtQ==", "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=MdhfF88Fb90w3ObISPFTLCeyM6NQNh1XntsiXhbQZ0Y=;\n\tb=j8zr768mtiFkDcu0cmc4sTG2W4nQshatbP5W8IW2/yfxpwzVfyRWlWkJ3ZoTB5any/\n\t1szIoMOlyPybCkEKy6hUyxfNB8hYmltfCBGWXkn9jCp+4ASTMRMmw4jZF2EslwSHCYub\n\ty0L3Bh36pSLtnqtNi3tyExldpV0V3C1TvSiEo0EUW3J7G9KtGikGdcfICSGSg0sQM2t+\n\tHdDgbfutabop6N80+8h02cPyz0YjqPYVgaSFZOP0IJU26hcdoPR666J2fTN3H1JEqKLx\n\tyf/Yw0h84Qyog34VnEvA6SRRrtdIjWFz/u8fziJ66lhpZieZuAZRzOPWCEUiTrt5IqZs\n\tSSMA==", "X-Gm-Message-State": "AOAM531XwtSeknt7vwtvULhbQ9uPzs4Q5fMOW7jZIJXnlZCI0rt/1iFN\n\teto/VBGSJCFv55JT6TWpMeNk79Hah9Yb8Q==", "X-Google-Smtp-Source": "ABdhPJyTgYfYvpPQUpnb7DgbGiuIFNJRVK4CvYMC5RCarn2Ya+efavFooyDjFibaxCrqO7lNZhuFSg==", "X-Received": "by 2002:a17:902:be0a:b029:104:4f7c:8140 with SMTP id\n\tr10-20020a170902be0ab02901044f7c8140mr13295554pls.70.1622575465626; \n\tTue, 01 Jun 2021 12:24:25 -0700 (PDT)", "From": "Vedant Paranjape <vedantparanjape160201@gmail.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 2 Jun 2021 00:54:05 +0530", "Message-Id": "<20210601192405.143591-1-vedantparanjape160201@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2] gstreamer: Add error checking in\n\tgst_libcamera_src_task_enter()", "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": "Error checking the output from generateConfiguration() was missing in\nthe code. Only assert was added as a guard which checked if the size of\ngenerated camera config was equal to size of roles passed to it.\n\nIf the roles argument has a invalid member, it will return a nullptr and then\ntrying to access a member on a nullptr for size comparison will result in a\nsegmentation fault. So, if the function returns a nullptr, it will simply put\na error on GstBus and gracefully exit.\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 8b6057df..910c0f83 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -375,9 +375,9 @@ gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread,\n \n \t/* Generate the stream configurations, there should be one per pad. */\n \tstate->config_ = state->cam_->generateConfiguration(roles);\n-\tif (state->config_ == nullptr) {\n+\tif (state->config_ == nullptr && state->config_->size() == state->srcpads_.size()) {\n \t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n-\t\t\t\t (\"Failed to generate camera configuration from roles\"),\n+\t\t\t\t (\"Failed to generate camera configuration from\"),\n \t\t\t\t (\"Camera::generateConfiguration() returned nullptr\"));\n \t\tgst_task_stop(task);\n \t\treturn;\n", "prefixes": [ "libcamera-devel", "v2" ] }