From patchwork Fri Apr 19 19:07:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48178 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp836984pzb; Fri, 19 Apr 2024 12:08:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVmWiGAbJhaYM6LVwFIPGNORnh0sibwtSFv6R2CTdUweG9M21cAUDD1us+mbg1J93gCWWk0nPvAhCGxGT0YuU4WuS45UzFoEmTfAw== X-Google-Smtp-Source: AGHT+IFgQilWh7GYDxsurfDRxSQh3pDGehTxjGn3PF8HmDuUcL/IE+WkKgjPohspO44BSkv5BKWv X-Received: by 2002:a17:906:a081:b0:a54:c11b:527c with SMTP id q1-20020a170906a08100b00a54c11b527cmr1875105ejy.4.1713553694413; Fri, 19 Apr 2024 12:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713553694; cv=none; d=google.com; s=arc-20160816; b=P83PjIJ7cRPAhGCqggRDENd+3pZkFNyfQQvi4SRI6CaVGlH/uj2/Ec+mtkD7p94q2k WcnPS943HbTBelLFLRo77mIyNdtYl8cMcCNqRtMNAnd1Xoo1rG8Tx/T32LerAjYY8CGW ckUIMjso5YqNjBg1ujk4duzXaxdDi79y4ke+WFSrn9em0wBrskOtVRw3tjpL6LHpMQWa Y3pltqaIynvTxoqfcRGUYYPxrY5eqHH0PAx2df8phNjQY+RY7dQPnyPAX5LVKOFPzkbH av5yxr5EoNnwZ1sfwPkBFhJRwUHmzDQtEOc6VYMbDk4MRUX3ABi8hWpxsrLM+HHFEEiY MQVg== 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=WOyiNaRaM2E1sHR7oyq8AMi/BQIHTS7q8CTVz+Z2HZ4=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=MPImvNfyfxkahpf8j95Y/Cag/m6tASClJJiRSFdbtPsI/4xNZTAaABsbOCGpYWZa4L 6QTK5Zn9FrU0Fbje+B+i67302+wa5z7wn5QjIBkZmBgITjJ5bQSOdulRrB22CGtXZWcu CfMjyLaWIlNv0XFP4fuHrd3fLhURPmtWAl74TBujp+tlPsRrl0KlrbMtz3FK5Khu7lgR sg3LkzDdkkowtLjXaeK4Z9y8o3iEEdn2YJ1Y6G1xUleGVizjQd0tl340MMnkle7YR0kl 2Tkdv+fP7BVmjmzoCX0u3ZZ6o9NFT1NHU3jwek/MearW+xcmk68tWTYKe7G1qRVauLFT Ljgw==; 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 kk9-20020a170907766900b00a52595a3a4asi2371163ejc.98.2024.04.19.12.08.13; Fri, 19 Apr 2024 12:08:14 -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 B811668D425; Fri, 19 Apr 2024 22:08:10 +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 36B1668D414 for ; Fri, 19 Apr 2024 22:08:04 +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 1rxtad-005Tu2-2a; Fri, 19 Apr 2024 20:08:03 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 20:07:59 +0100 Message-ID: <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <819f684d-8a72-465d-ab22-3eef5bc3468b@gmail.com> References: <819f684d-8a72-465d-ab22-3eef5bc3468b@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/3] avformat/network: add ff_neterrno2() for cases where we already have an errno 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: bixWtPpojCap For example, WSAStartup()'s documentation says: "A call to the WSAGetLastError function is not needed and should not be used" --- libavformat/network.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/network.c b/libavformat/network.c index f752efc411..fb70f9cafc 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -121,9 +121,14 @@ void ff_network_close(void) } #if HAVE_WINSOCK2_H + +} int ff_neterrno(void) { - int err = WSAGetLastError(); + return ff_neterrno2(WSAGetLastError()); +} +int ff_neterrno2(int err) +{ switch (err) { case WSAEWOULDBLOCK: return AVERROR(EAGAIN); From patchwork Fri Apr 19 19:08:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48179 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp837063pzb; Fri, 19 Apr 2024 12:08:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZvFbSTdTAn0hZDVFdJPVIj6MuBOgnZsOu/4tTBV3MdqXpniDzVcafXv0trnZYBK1+i6sP9n0XLCvsmFeFNx6ZSbTUO/HHWt6qfQ== X-Google-Smtp-Source: AGHT+IEPcipATDQsPrgkM6qCfJDnr4cFVlR1IZr3+NnH1HRJXtntEJioSxfx9q6VKWhyPH5FUTj6 X-Received: by 2002:a17:906:2591:b0:a52:6cb2:9347 with SMTP id m17-20020a170906259100b00a526cb29347mr1856414ejb.8.1713553703028; Fri, 19 Apr 2024 12:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713553703; cv=none; d=google.com; s=arc-20160816; b=yo8cHnmyhPWM/w/uwCSYRNUtcg4j4k+jvh7SiMNNXoQjQCGFXClnZCaOtwEVbuj1Ye KCj0rKvqCqYp/Auzx8Pzyrr5tbr/yStkMMCi9XMxF+c5zkuTLOaqu/ZE1ssVBPX/42ND sqDYkfSHoDu9sA0IJaNLoChcnlBpZMqTBTrwOqLTan63THnLAJjXPMMScBVf+ChszHhE rpdzEd6Dl2+rvITinb9q3gia+SP9zQ8AoB8Y0klNwXm66pl7o9hQP8Bau7tCbWjf8lTJ 8aa/1MllaLsGrO65LNHBGRMhj9mzVX+87wtK2tAV2szDy5yMiro6lI874cebr0SLdQJj +3pA== 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=TEQ4xUCAILB4HjG/tPuM744+QaOSmSCjUT8Yhq0l018=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=Ad2zGmCCjLnv1lRwyv16z87FJIcHbu99IKwgR865hMs5NCw/n9EzqL5uqenhjcBOlA QK2ZppuKriJB2wK+2v3DHpAbgjXk4INmfByDgYvR7RCcuAB1NVFRsYnIIEY2j60FBeoB 2GFWgBZUDuJ4JMRuIEb/DWpu1MOeBnwpim5jMrfBUhHEbswG7i9z14SG4fUhAy0qWXOf tUXqvIA6H9VTJFmhnZATGZ/od6XNkTBTUcwqQ0GWsDSqlD2yrTupP8VqjCpbU5dDxiia Ut5IWVfKflELvHrdA8ivyp5c/vtAYHjaILCf6MwPuYqYXk3K/xkVYLCMCWpU7G9XlwTh tQKg==; 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 u6-20020a170906b10600b00a52434e411dsi2432132ejy.525.2024.04.19.12.08.22; Fri, 19 Apr 2024 12:08:23 -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 C8E7268D430; Fri, 19 Apr 2024 22:08:11 +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 346AC68D39F for ; Fri, 19 Apr 2024 22:08:04 +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 1rxtae-005Tu2-0J; Fri, 19 Apr 2024 20:08:03 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 20:08:00 +0100 Message-ID: <20240419190801.169291-2-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> References: <819f684d-8a72-465d-ab22-3eef5bc3468b@gmail.com> <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 2/3] avformat/network: Return 0/AVERROR 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: CIFPHwJ/e3ZI --- libavformat/avio.c | 4 ++-- libavformat/network.c | 7 +++---- libavformat/rtsp.c | 12 ++++++------ libavformat/rtspdec.c | 4 ++-- libavformat/sapdec.c | 4 ++-- libavformat/sapenc.c | 4 ++-- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index d109f3adff..f82edec779 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -123,8 +123,8 @@ static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up, int err; #if CONFIG_NETWORK - if (up->flags & URL_PROTOCOL_FLAG_NETWORK && !ff_network_init()) - return AVERROR(EIO); + if (up->flags & URL_PROTOCOL_FLAG_NETWORK && (err=ff_network_init())<0) + return err; #endif if ((flags & AVIO_FLAG_READ) && !up->url_read) { av_log(NULL, AV_LOG_ERROR, diff --git a/libavformat/network.c b/libavformat/network.c index fb70f9cafc..134869a63f 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -59,11 +59,10 @@ int ff_network_init(void) { #if HAVE_WINSOCK2_H WSADATA wsaData; - - if (WSAStartup(MAKEWORD(1,1), &wsaData)) - return 0; + return ff_neterrno2(WSAStartup(MAKEWORD(1,1), &wsaData)); +#else + return 0; #endif - return 1; } int ff_network_wait_fd(int fd, int write) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index b0c61ee00a..3db4ed11c2 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1740,8 +1740,8 @@ int ff_rtsp_connect(AVFormatContext *s) return AVERROR(EINVAL); } - if (!ff_network_init()) - return AVERROR(EIO); + if ((err = ff_network_init())<0) + return err; if (s->max_delay < 0) /* Not set by the caller */ s->max_delay = s->iformat ? DEFAULT_REORDERING_DELAY : 0; @@ -2395,8 +2395,8 @@ static int sdp_read_header(AVFormatContext *s) char url[MAX_URL_SIZE]; AVBPrint bp; - if (!ff_network_init()) - return AVERROR(EIO); + if ((err = ff_network_init())<0) + return err; if (s->max_delay < 0) /* Not set by the caller */ s->max_delay = DEFAULT_REORDERING_DELAY; @@ -2522,8 +2522,8 @@ static int rtp_read_header(AVFormatContext *s) AVBPrint sdp; AVDictionary *opts = NULL; - if (!ff_network_init()) - return AVERROR(EIO); + if ((ret = ff_network_init())<0) + return ret; opts = map_to_opts(rt); ret = ffurl_open_whitelist(&in, s->url, AVIO_FLAG_READ, diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 10078ce2fa..3b0829694e 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -663,8 +663,8 @@ static int rtsp_listen(AVFormatContext *s) int ret; enum RTSPMethod methodcode; - if (!ff_network_init()) - return AVERROR(EIO); + if ((ret = ff_network_init())<0) + return ret; /* extract hostname and port */ av_url_split(proto, sizeof(proto), auth, sizeof(auth), host, sizeof(host), diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c index 357c0dd514..719c26c6b8 100644 --- a/libavformat/sapdec.c +++ b/libavformat/sapdec.c @@ -70,8 +70,8 @@ static int sap_read_header(AVFormatContext *s) int port; int ret, i; - if (!ff_network_init()) - return AVERROR(EIO); + if ((ret = ff_network_init())<0) + return ret; av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, path, sizeof(path), s->url); diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index 87a834a8d8..3305122524 100644 --- a/libavformat/sapenc.c +++ b/libavformat/sapenc.c @@ -80,8 +80,8 @@ static int sap_write_header(AVFormatContext *s) int udp_fd; AVDictionaryEntry* title = av_dict_get(s->metadata, "title", NULL, 0); - if (!ff_network_init()) - return AVERROR(EIO); + if ((ret = ff_network_init())<0) + return ret; /* extract hostname and port */ av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &base_port, From patchwork Fri Apr 19 19:08:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48180 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp837158pzb; Fri, 19 Apr 2024 12:08:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLqU7zZIBtjbdS7Nzy762cH+Yt2cOc2URkCzAR8tw0/W+YxGY9HApM94gUJVGB5OYIBBogekakuLkr+RD2vJsG+PBeXjAkI0tSoA== X-Google-Smtp-Source: AGHT+IF07lcyQDbH51N9pvgVWZ6BVOYnBBl0fpkCHX9FKeDNIEKtrizGlCIS9excOxRSvvSJnGGj X-Received: by 2002:a05:6512:752:b0:519:23ee:536 with SMTP id c18-20020a056512075200b0051923ee0536mr1780059lfs.9.1713553713564; Fri, 19 Apr 2024 12:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713553713; cv=none; d=google.com; s=arc-20160816; b=h67Wlpwe8aln/+GoPuyGnnvV5a0J4zkK+rg9VoWVCHLXR0uQOfgt6zOX8K/QJ3kKLd NgzZFaqex+f2pKI/ATSR8ohGUnjvcOYgvVBNlo1rURxOD6yjyNG+2TH4h9UPlEEm9xGL Txikcqf0hjAUjB64XIxp2o3XjSiJJAGcBkbczXdG8GWDycfuUES/p10biasg3o9Y/xC+ 244YZh6Nb2zMNvkf13N5eqd/QrnP4NOpYNZOv3AldbCGqlNc+5zvmygraX0z9R/h3z6E zSwtguUVaxS0UdUeAI1CP9Pr6WyWrCRdAj0l9D4ZfZEJRQSxTeSuKqCbd/JnhYF+Q+94 rWKg== 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=qITpzMlyulSxfW28gOqD8EaAWmZ17M8LWriM3gyOPik=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=eVL8WLLtq1BGrewUSUX+sQ59DRmFGW4NWEpaooxqOgkNIhr/YTjEagOJ6MbSR1LlPd Xj+03LHrldiNw7x623vDPfiQOxU9l/PrBSZz+TUfDNKg3vaLBxBlAAalaEvxqLQ1VuhA 0fSwdKq7E4BG4f4Mt1dH2QuL6hfqUBTmUtEHw8wR1ttnFL/ft63ScH2gyWb/IRQBCjQf BlK+oZoptesd9zYsd9+vIkYEZ5Cc7328cn0TtRWeX6oJv7hq0z1fUtmeA/A8AXa7Iyzi Y2TgZJ1m5rYJgdIyyeDuXFFmrs5pubHCq+gdcBAnc2ec7JDGd1E33D5twg8aOGQsOMq3 Q+YA==; 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 b17-20020a056512305100b0051a9a7a26c4si923101lfb.59.2024.04.19.12.08.32; Fri, 19 Apr 2024 12:08:33 -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 EE44768D435; Fri, 19 Apr 2024 22:08:12 +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 848C368D39F for ; Fri, 19 Apr 2024 22:08:04 +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 1rxtae-005Tu2-1H; Fri, 19 Apr 2024 20:08:04 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Apr 2024 20:08:01 +0100 Message-ID: <20240419190801.169291-3-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> References: <819f684d-8a72-465d-ab22-3eef5bc3468b@gmail.com> <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 3/3] 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: aDjJaIe5e5BA --- libavformat/avformat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..f624fb1e2e 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 for success or AVERROR code */ 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 for success or AVERROR code */ int avformat_network_deinit(void);