From patchwork Tue Nov 7 12:58:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 44546 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:7aa7:b0:181:818d:5e7f with SMTP id u39csp288774pzh; Tue, 7 Nov 2023 04:59:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiVlfw5Wt+/LOPA3xD+97ya/xd+rRcxVaDWDiUGpCIhtAJeXVFL3eRnzjGBawinKKyIHaC X-Received: by 2002:a17:907:930d:b0:9ad:f7e5:67d9 with SMTP id bu13-20020a170907930d00b009adf7e567d9mr15134160ejc.4.1699361978102; Tue, 07 Nov 2023 04:59:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699361978; cv=none; d=google.com; s=arc-20160816; b=e/P3GLjprABd/KdEFv0442MPgMh+y2yumWzc6hM84f4pEXy0Z3b+MCX/h8ofBKYJvK p+FRG7+cjfpmX83BMoXRwkm2kAbLIt/zXQ6Gs+iumaRM1cIC7CUN5Bg4tiXmnA3agyxb G5QzTwT5RIhadnpQeKFnGtsckUWb0WPY+LAaJMQOD5KSmXR2yIVTSVafcpv+uBASynWf TLq2B4daFFSRwdCLePZuuoeyhXYMiDKrUJtc7Sy63K0fUTVqavHIEmFjlPb/UZfUaG2/ HfcU6NHKQQGPBs9wAZDKT1117MBAHbuJEqSJ26vbUWEhamQ8pBFM5+AmY+59svPjGjaB uRHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=4o67TQG7Ps+tfggcxcT3oAqo/IP+PFLOLpsNFTdlNIc=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=j2DDKZKzRH6msclNqlGY9I2atRUgjl2uGgpbA8KIdVhH8dz4HFrV5dk2jo3mJm7qwx rONFKStoqrIrBMM5dgOKB3reVFufcdS99C0ARrTlo7kuo1YAFaDdbpzEU1cIQm1oYsAP 8Hy+oJeXOww79sPU/skzUNAODcGUd4SfcianFfWtmnjoUgW4CMixL8bpehHG8k3TAqkE aZa6E1t4AidtPm7swkvY/EoPnjb0QGHebHmuuA6nn/eNLRqQpnADs1216TmrqBR6DBuD 0eB/rEqc93DxuSDb66FDbXMQrru/hYJFaXH/iAxCDHphJqVe4lC22/IAq9+Ezg4PkABt OBKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dl17-20020a170907945100b0099bcf9c2ec5si1027666ejc.967.2023.11.07.04.59.32; Tue, 07 Nov 2023 04:59:38 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 21F7D68CAC6; Tue, 7 Nov 2023 14:59:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5471068C790 for ; Tue, 7 Nov 2023 14:59:13 +0200 (EET) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id A4EE412BE for ; Tue, 7 Nov 2023 13:59:12 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id QiKKiUGUXuru for ; Tue, 7 Nov 2023 13:59:12 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id E76A51102 for ; Tue, 7 Nov 2023 13:59:11 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 21BD43A06A1 for ; Tue, 7 Nov 2023 13:59:05 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Nov 2023 13:58:34 +0100 Message-ID: <20231107125835.25827-3-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107125835.25827-1-anton@khirnov.net> References: <20231107125835.25827-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_filter: return an error on ofilter_alloc() failure X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: l5DaJkhdGIlC --- fftools/ffmpeg_filter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index c8920d9234..b7da105141 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -928,8 +928,10 @@ int fg_create(FilterGraph **pfg, char *graph_desc) for (AVFilterInOut *cur = outputs; cur; cur = cur->next) { OutputFilter *const ofilter = ofilter_alloc(fg); - if (!ofilter) + if (!ofilter) { + ret = AVERROR(ENOMEM); goto fail; + } ofilter->linklabel = cur->name; cur->name = NULL;