{"id":22343,"url":"https://patchwork.libcamera.org/api/patches/22343/?format=json","web_url":"https://patchwork.libcamera.org/patch/22343/","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":"<20241216104704.957343-1-pobrn@protonmail.com>","date":"2024-12-16T10:47:07","name":"[v2,1/2] gstreamer: allocator: gst_libcamera_allocator_new(): Recognize errors","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e4c9ce980ae14abb09b15adca8b870253c4b3a47","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/?format=json","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22343/mbox/","series":[{"id":4894,"url":"https://patchwork.libcamera.org/api/series/4894/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4894","date":"2024-12-16T10:47:07","name":"[v2,1/2] gstreamer: allocator: gst_libcamera_allocator_new(): Recognize errors","version":2,"mbox":"https://patchwork.libcamera.org/series/4894/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22343/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22343/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 C7B58C32F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Dec 2024 10:47:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BFFD867F4C;\n\tMon, 16 Dec 2024 11:47:14 +0100 (CET)","from mail-10630.protonmail.ch (mail-10630.protonmail.ch\n\t[79.135.106.30])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E46E560136\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Dec 2024 11:47:12 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"JB2FNfoX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1734346031; x=1734605231;\n\tbh=72aGnPxsaxIY18fcGLOLQub8Q2ibRsTGzNJKV8OatH4=;\n\th=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:\n\tList-Unsubscribe:List-Unsubscribe-Post;\n\tb=JB2FNfoXcnE9HneSFXVNylrXCNngxxsfKotzxFM81f7Nv0YA8QqhiXnKz6kpjX66x\n\t1w28dP1fe7nzvEjX2Wv8axw8cCHBy1KJDObwSWX+mixVrbnXt5nWZqC1PMplC9h4eD\n\tJLTftc5gVhFTHYdKpG/e/yI9ZmngAI63AJDycxbwN3t/ZGiJgvW4FEX4JcNmtzJag3\n\tMD0678ltI7favUPAZLtu9LANq2tpQ+dxUkPv5BngOla53L6M6inwbiQ4+D306fF+GQ\n\tC9PSmMDwtQSgApjWGh6UcupR8E3UvmFUEZ3ZEg4V7yN9fS8yZdHExIDdaneGOyhhW0\n\ttrc9B4IFaNIDQ==","Date":"Mon, 16 Dec 2024 10:47:07 +0000","To":"libcamera-devel@lists.libcamera.org","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Subject":"[PATCH v2 1/2] gstreamer: allocator: gst_libcamera_allocator_new():\n\tRecognize errors","Message-ID":"<20241216104704.957343-1-pobrn@protonmail.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"ec1a710915a77b38b9cc46116e7da1409de7790a","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"`FrameBufferAllocator::allocate()` might return a negative error code,\nbut currently this is handled the same way as success. So instead\nof continuing, abort the construction of the allocator object.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n---\n src/gstreamer/gstlibcameraallocator.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\nindex 7e4c904da..b0c84893a 100644\n--- a/src/gstreamer/gstlibcameraallocator.cpp\n+++ b/src/gstreamer/gstlibcameraallocator.cpp\n@@ -214,7 +214,7 @@ gst_libcamera_allocator_new(std::shared_ptr<Camera> camera,\n \t\tStream *stream = streamCfg.stream();\n \n \t\tret = self->fb_allocator->allocate(stream);\n-\t\tif (ret == 0)\n+\t\tif (ret <= 0)\n \t\t\treturn nullptr;\n \n \t\tGQueue *pool = g_queue_new();\n","prefixes":["v2","1/2"]}