From patchwork Fri Apr 19 17:23:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48176 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp777268pzb; Fri, 19 Apr 2024 10:23:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2mDIpXI10My3puak63HLuD10YjyNpn86j7HyYcaH4Jo/3YS7A2GeuUHHwroaqgbNbDPQtttQl6LyVO5EMLsZ/vBrGta2pM+NzOw== X-Google-Smtp-Source: AGHT+IHP1PkGTD5a8ru/ZcmKos2KdbzQYHabGzpsoXX2YMFj1DKFfqhTK7/7gowf1b5+YlbMmS11 X-Received: by 2002:a2e:8206:0:b0:2da:c3a:2546 with SMTP id w6-20020a2e8206000000b002da0c3a2546mr1677769ljg.21.1713547407877; Fri, 19 Apr 2024 10:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713547407; cv=none; d=google.com; s=arc-20160816; b=jVk7YN03YRuxjaTd7dkdiw6dQxKqvh66YTGGJjC/hlHA19OYJHCSbY6FxIL+nEf9Hx crxBnn+QNRUNM2jbkAkqgX/phk7Ero2BevSZXT/14A5IC8VerSm0vOEd6vUEMSipc0bx zWvgtVM+vktNL4jR3FhV+LD0atPpLoC5Rn+xfed2cFP20Hf9nQ9JDDIVJSMDXbJ14BPL TGBpTvbisVJu2lCDNaN6Uj4qBdLgMkpKVAMObBsWGEWbnQ+890ye3CVWHXMWbFpI5/ER nSsyTbkzkOsOBhbmfswCr7+DvnuQE9SiwvszyN61kxe3oTfWt6MFiS0Dp35BXnj3Uwm0 +YEw== 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=M9wZVJ4NNXBCJPxHiZ4ivlz480PAjtDvO55fa10inTI=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=nViI5uPrFayNpvXaKm8ikWMe2TCN5GZlcEx5yutsjgFVtw5sxprosiJaU0T969xRMc rwcur5PbAq1NihJ2iwfphPbH95uWa/RujQdXxN7di9Kyy1+cgzMKrpxl1Ihpqie3Gvo0 YQI9dzKFPMX1WiT8vDgYWS7yFTIZpO0Qf47v8GyzrvWea85X7wTi+iPJIoQx8UiSPabk CVYBtAPp3sdYxHGziZ2JG3txdGd132OM8qmose2oKRryPbWU6igD8yxVXPq+QcOR3o8n qfU1ra+a64E+If8FAguW9ki+zLTk3+XX6Ptwl7E7y6t9ptyckomy4s++7h2d/+/6PsNQ UGRg==; 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 e19-20020a50a693000000b0056f5e86cab5si2386235edc.431.2024.04.19.10.23.27; Fri, 19 Apr 2024 10:23:27 -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 2A89768D3BC; Fri, 19 Apr 2024 20:23:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from alt2.a-painless.mh.aa.net.uk (alt2.a-painless.mh.aa.net.uk [81.187.30.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5DFA768D3F7 for ; Fri, 19 Apr 2024 20:23:17 +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-a.thn.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1rxrxF-005L60-0E; Fri, 19 Apr 2024 18:23:16 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 18:23:08 +0100 Message-ID: <20240419172309.101782-1-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <3e292cbb-8248-4dc6-a750-27f7b0e8ff8f@gmail.com> References: <3e292cbb-8248-4dc6-a750-27f7b0e8ff8f@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] avformat/network: Return a proper negative error code from ff_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: zi8SAmSWk38J --- libavformat/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/network.c b/libavformat/network.c index f752efc411..d518bb0541 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -63,7 +63,7 @@ int ff_network_init(void) if (WSAStartup(MAKEWORD(1,1), &wsaData)) return 0; #endif - return 1; + return -1; } int ff_network_wait_fd(int fd, int write) From patchwork Fri Apr 19 17:23:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48177 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp777352pzb; Fri, 19 Apr 2024 10:23:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXTU97Ghhkd/IpLqOv0oN8DB4Ah4UaRXmh7Zwt/DB5HMzzdRZle5j5utGwiN4PoFvn2qrn9hQiUx30BCe3k+70MnwastFfYrSY9Vg== X-Google-Smtp-Source: AGHT+IGwkGF5+dEV0/J9Ld4FyLLFwXKPJ2fnurWArkqsbJuammq1fRUhXE5hMeqqc+qY4xEois+A X-Received: by 2002:a17:906:951:b0:a55:622d:1954 with SMTP id j17-20020a170906095100b00a55622d1954mr2164882ejd.57.1713547416704; Fri, 19 Apr 2024 10:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713547416; cv=none; d=google.com; s=arc-20160816; b=0TS8dSBZsUuIaOBsCuz5AINC1QXDQPnlNs2alDGg6d7w0zDYoRaexzI6qdCvyFx3/Q l2IWER3H2JqKDSlw/eTxJGoHdrguwTPbPLCEXJsQzu9igRaXG2q9Lu1mkeEnEqLu6Qh7 8VX4dIIYc25qLF0Xrv31PNjPRjiDWtsMeZXkIPrSdjUBwnAhxZnAvDSxx7SMrvFI1lk5 wTdMcr8GIT8bHvEsG04xCwofCQntdBddvgSw34YsFfMHb9T1gZdNMaHfHWAbVtLziZaP BWzz7mH/DwbN1XXE4D5y/dXe+2jHikMbx2dQ2oJ2fOmGi6FzRQPl9GPWUhwAQ1DuNTDG q6CQ== 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=Tpl8JH3mWwIHCEevOzT/BYf1se2ykxlViKNWIdmFwvo=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=DPwG7gsOFZLi5eul4XHg1TbrPjsBohsvBJi/DzDh+aSYT0eimBZN4AqzoZxVfLzMAt 55IcSmge9LuD/ghGAgrBSVJWOxjpOd8rx97p3TBR2qnugFXbl5gShNNMCVXB5XsNhf93 GCFP/wp1O54xGz9uMDJiRWiWy9fKTvpjoQGmY8T+uEk0t3vLl4/YJCH3mO49/L1Fi7Yg dBL3LfkY+OJ7k3N++eG542xBxLldgRyl0JnEAx8/ml7pLXcnldZaew1ohF0KOJnpcqSN mJ3ydm4NhxC0/Qrl5B2p4StuMuLpAHUt4XWj8ME53C6fJFEoUNpUMwuZFhuvG4iFSB7+ ndRg==; 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 qw26-20020a170906fcba00b00a5262cffab8si2291859ejb.602.2024.04.19.10.23.36; Fri, 19 Apr 2024 10:23:36 -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 6949068D415; Fri, 19 Apr 2024 20:23:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from alt2.a-painless.mh.aa.net.uk (alt2.a-painless.mh.aa.net.uk [81.187.30.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 760C568D3FA for ; Fri, 19 Apr 2024 20:23:17 +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-a.thn.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1rxrxF-005L60-1B; Fri, 19 Apr 2024 18:23:17 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 18:23:09 +0100 Message-ID: <20240419172309.101782-2-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419172309.101782-1-ffmpeg-devel@pileofstuff.org> References: <3e292cbb-8248-4dc6-a750-27f7b0e8ff8f@gmail.com> <20240419172309.101782-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: Mtvt9qKigUm7 --- libavformat/avformat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..ea816a0b22 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);