From patchwork Mon Apr 4 11:30:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35199 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp1916069pzb; Mon, 4 Apr 2022 04:41:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9NlE/jKgSxKzwDfP9Rl6lPhozS7T799gvZYeVPGrfT2fWSebf7JyEZ3ILdPCcdlI8qhK8 X-Received: by 2002:a17:907:62aa:b0:6e0:f208:b869 with SMTP id nd42-20020a17090762aa00b006e0f208b869mr10139275ejc.270.1649072481499; Mon, 04 Apr 2022 04:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649072481; cv=none; d=google.com; s=arc-20160816; b=r/+gR3gYTWDeULCgD8XYDxcoFyJBcFYRJGhUDsKAvfDfZouy+vEZZnzq9POtjfvtft aWBltdrWJDia4Vsplm+P6a7CMEXS4lJxm2l0n/ePq8mc3Bqm/JrsPuY8+K54ZWvfiWzo uO0oRxwjlRSlNwCDx8xOxI9BiVcC2UsKLxYT+bZo4CGfYtUcbcSqd9EDn5btzd4HGQqA QgboL1xmV8OEprQAQlNUOkIC/H9WtfdsZsk687jUcKjCzyKArDiu7Rq4HHZsVPfvgRv6 h2ltDEM2I/usBdRfM4YUvfezFB/9ZYGKS+PySVTwsjOEgSSXckYY15kPhqnUg9yJanuY 0GqQ== 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=/HXeE66kjk5C+kRlcs2QK0gherbrQ3BP26vlofYdiJg=; b=J0eKH96Nm0vV9h2tGOurGMAk0hj6/oBQYTKkcFak7+uHZBNPYiU3VsKIm1gr2n8mYq zlhGfR26Ibqm1M3C5pcph8SordUZFbUHsu6s6HyWy0Ctja0dToKHEG0yZpaPs7UkVsS+ j+YMzRTOB3kfA286WyWbLT0/mupxW6v3rtS4fS6hrOsPC+brBc+U0eJdAjnRhl6MJTVh qwGLYhxW99m2FH8sQh71zLFFNgkfiDNYDeOOLv+Uu/4+eMtgruiEQo9cA3OTLwh79hYC 0Y/VUA7VXxwhGex2Mj9xxHoh3ychgxIfyRxYGTNzrPSHVQ/Aih3QVbPmRTGubx4e1cKc oEdQ== 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 v8-20020a1709060b4800b006df76385bc9si6275138ejg.105.2022.04.04.04.41.21; Mon, 04 Apr 2022 04:41:21 -0700 (PDT) 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 3542E68B3A1; Mon, 4 Apr 2022 14:38:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5CABE68B360 for ; Mon, 4 Apr 2022 14:37:47 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 12C48240511 for ; Mon, 4 Apr 2022 13:37:47 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id UA32qjnXuE-a for ; Mon, 4 Apr 2022 13:37:46 +0200 (CEST) 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 mail0.khirnov.net (Postfix) with ESMTPS id 060D22405F0 for ; Mon, 4 Apr 2022 13:37:42 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 449F63A0E3A; Mon, 4 Apr 2022 13:32:12 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Apr 2022 13:30:32 +0200 Message-Id: <20220404113037.13070-45-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220404113037.13070-1-anton@khirnov.net> References: <20220404113037.13070-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 44/49] fftools/ffmpeg_mux: do not call exit_program() in print_sdp() 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: 0+NgeYbg62JL Return an error instead, as is already done in other places in this function. --- fftools/ffmpeg_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 087009e0eb..2fd131d1bc 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -319,7 +319,7 @@ static int print_sdp(void) avc = av_malloc_array(nb_output_files, sizeof(*avc)); if (!avc) - exit_program(1); + return AVERROR(ENOMEM); for (i = 0, j = 0; i < nb_output_files; i++) { if (!strcmp(output_files[i]->format->name, "rtp")) { avc[j] = output_files[i]->mux->fc;