diff mbox series

[FFmpeg-devel,1/2] avformat/utils: handle errors > 0 in avformat_network_init()

Message ID 20240419165946.99911-1-ffmpeg-devel@pileofstuff.org
State New
Headers show
Series [FFmpeg-devel,1/2] avformat/utils: handle errors > 0 in avformat_network_init() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andrew Sayers April 19, 2024, 4:59 p.m. UTC
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Almer April 19, 2024, 5:04 p.m. UTC | #1
On 4/19/2024 1:59 PM, Andrew Sayers wrote:
> ---
>   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()))

ff_network_init() needs to be fixed to return negative error values 
instead. This change will make it return 1 on error on Windows.

>           return ret;
>       if ((ret = ff_tls_init()) < 0)
>           return ret;
diff mbox series

Patch

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;