From patchwork Fri Apr 19 16:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48174 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp760353pzb; Fri, 19 Apr 2024 10:00:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWv+gO72jBDCNNiiIkWdUsk88jhl4aiKpQKf7SlTgYvigKhMZx3BhNY0ibQ0WwXbG6IPCxzfNjtb/41ILjkDCoEarAUz228NRV+Vw== X-Google-Smtp-Source: AGHT+IHsl1naX0ps2mLssx2P4YKGsyaVdVZ7EVlvi7QPZQWWKBz0OYW2DJjHoO/KSQLfO4f1fj9+ X-Received: by 2002:a17:906:b0d:b0:a52:61a3:a7db with SMTP id u13-20020a1709060b0d00b00a5261a3a7dbmr1824686ejg.22.1713546007129; Fri, 19 Apr 2024 10:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713546007; cv=none; d=google.com; s=arc-20160816; b=hjizsxAAadQ/krPNN5+1AF+5qyr8pB93rLLFZ8Hz2NxmxbjTbjV4ZJJcjQGDmWUnh1 ZylsHWAOc6A2OP3smoABp9u18X/q74qo6BDiXeXXnsrx7KYkWSlk/izgGmX/CeCanGRL BC7gzMpsGx3SyrFCCXTrCwD3pGijGgSDX82HrWlOeB6nbUi8+4M/nQaL5zQH1abJ19F3 LUK10kjfpTv1beoiy7GIY31HQDaVh7C0EExId/DvHgZH13fr4BlyMt9dYyfOg/GWqNSE 8AxpB74UpzCKc1BqBRtQzGsopt84DorbttPjqmlZg1k8uEsRK3LbhfBsK1aU6hqYiY4z VqSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=1O1eVQtPGzfkgqmOEwMjIh5g4pAnGkkJWPrHjnFb+RY=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=uVpEz89Ze57rOfjr9F9T2vSTe6FWeRPdEfIiTHxKY9qK3BMJ6x1u9XOt+iOoSNJ6Sz rOPQqBsL/kdOC5sjT+umt6DF9qGg4iajDDAnyTccC6J6KIrBSahbJUZEQ+VOptTkSmDr 47YLrT4bdcc4xjyvCjbnUTukrMVjfpQIBDUbRkjdNQOcOKlB3johAtrmyE8B7XKrKlJm PG17aED31xfBX5xvHQ7QWMJqAelHlFc1JmsUdQLKsJDIp8seIhB1yfK2zBD2k9uiSMtl RkFxH7G5LF4B2RSXfdWGj+IzfKvQgi4T5EaGjgyRLzKwMLkFLyZbDktVwgSpb/aw2STF C5bg==; dara=google.com 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 kk25-20020a170907767900b00a553e132b5fsi2399701ejc.157.2024.04.19.10.00.06; Fri, 19 Apr 2024 10:00:07 -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 01F7168CABE; Fri, 19 Apr 2024 20:00:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from b-painless.mh.aa.net.uk (b-painless.mh.aa.net.uk [81.187.30.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DCA5068CABE for ; Fri, 19 Apr 2024 19:59:54 +0300 (EEST) Received: from 0.b.4.b.7.4.0.8.c.4.a.5.d.8.b.2.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:2b8d:5a4c:8047:b4b0] helo=andrews-2024-laptop.lan) by painless-b.tch.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1rxrac-002zRH-16; Fri, 19 Apr 2024 17:59:54 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 17:59:45 +0100 Message-ID: <20240419165946.99911-1-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/utils: handle errors > 0 in avformat_network_init() 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 Cc: Andrew Sayers Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: aHxSH/Mc7Zoj --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 4dded7aea4..855723a406 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -560,7 +560,7 @@ int avformat_network_init(void) { #if CONFIG_NETWORK int ret; - if ((ret = ff_network_init()) < 0) + if ((ret = ff_network_init())) return ret; if ((ret = ff_tls_init()) < 0) return ret; From patchwork Fri Apr 19 16:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48175 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp760538pzb; Fri, 19 Apr 2024 10:00:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUnREuEaqz8TsLcddxF3Q8yeuXH/OdX2Iozm/Vq9aPXEOewaOIVP1EuP7bn1c2PgyfEywESiCkOuHBEu8sN5d0avDOJ9VAcTfe/lw== X-Google-Smtp-Source: AGHT+IFOhT4wCN2EqSiKrJTQMkuKIZk/yXSw0mBC0ycgqAxqrN+HAjoCNVXCbNA7xLaRysdsgTJw X-Received: by 2002:a17:906:830f:b0:a52:3b6a:ab43 with SMTP id j15-20020a170906830f00b00a523b6aab43mr2039435ejx.67.1713546018785; Fri, 19 Apr 2024 10:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713546018; cv=none; d=google.com; s=arc-20160816; b=riaA+CHny8VcWMXZMFimiPhcCtKn6OnNjBKkMaCUR4GxdAJzT6i9EKWIBfCLNfHj7p E2HZFnspS33pYGP1XCyMMs3yN4+4bjW2q9dEZGXANDLWOo1hcP5OiTfKdPCUuN6oFmP1 XbXg225XsGa01dY7sPeE6zTEkZ9d2pkXMkhNnQrNkIn+OQmIdknYKVmUQMoS8gxv94ph MqvRRxC1wFeFxV1GhmVYL7zSMV7kOM3XIGqxguDQysmG9AfQDQTpBny7JcIDdgKy2fnu Y15S9alwyrR/wm8cOmhAJhaLLwYsAs/5Ccyd3P6GyayaJNp5uoXZ7XHPD8AhgAKhRdyf Nu5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=RW8GADDWUPkdJsZfpoHFACFaWvn8lXNTYhth5QS0Vgs=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=g9FQW+IaeABJ8dpf3DA3UaHSoV3XABZZNYnqMqRBzqbL1lXZ97KpF7ChVcsfrPEbnN us1ZUEjy8WriyrWo/K6cFdj6VxzAbkbgECyYaFh1CITGK3c6aJmDPUB7bwuZVrk7WVrV tU5xwvWWEnirlt4tsVS2nXlAGUruswgVctb0uU17HlPxkk47MI6jgh4WWg/d9HBLRF0N B6UgF5y/2bzeWtrH4WV204PuRFBwBI7ybioSkAmId0QbVYakIKs0Vl0btWrHlaWdeZ+5 7+A1AjPIJNo7YQ3Bo/p6WOVmqjmRyqAGXwfmrLrTzkDHZkeAtiQQZclOmQcDp0D6VkZs LBQg==; dara=google.com 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 gs41-20020a1709072d2900b00a5210535db5si2546399ejc.440.2024.04.19.10.00.18; Fri, 19 Apr 2024 10:00:18 -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 3E27368D3F3; Fri, 19 Apr 2024 20:00:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from b-painless.mh.aa.net.uk (b-painless.mh.aa.net.uk [81.187.30.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 35D6668CABE for ; Fri, 19 Apr 2024 19:59:55 +0300 (EEST) Received: from 0.b.4.b.7.4.0.8.c.4.a.5.d.8.b.2.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:2b8d:5a4c:8047:b4b0] helo=andrews-2024-laptop.lan) by painless-b.tch.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1rxrac-002zRH-23; Fri, 19 Apr 2024 17:59:54 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 17:59:46 +0100 Message-ID: <20240419165946.99911-2-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419165946.99911-1-ffmpeg-devel@pileofstuff.org> References: <20240419165946.99911-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/avformat: Document return codes for av_format_(de)init 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 Cc: Andrew Sayers Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: z74lo8Gkdyfl --- libavformat/avformat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..0feaeded0e 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1944,12 +1944,16 @@ const char *avformat_license(void); * This function will be deprecated once support for older GnuTLS and * OpenSSL libraries is removed, and this function has no purpose * anymore. + * + * @return 0 on success, !=0 on error. */ int avformat_network_init(void); /** * Undo the initialization done by avformat_network_init. Call it only * once for each time you called avformat_network_init. + * + * @return 0 on success, !=0 on error. */ int avformat_network_deinit(void);