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

James Almer jamrial at gmail.com
Fri Apr 19 20:04:41 EEST 2024


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;


More information about the ffmpeg-devel mailing list