From 23c70e3740b29c42db54f583fefaa2cae4fc360f Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Thu, 26 Jun 2025 02:37:15 +0200 Subject: [PATCH] avformat/udp: don't override 0 localport --- libavformat/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index c1ebdd1222..30f075de8e 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -780,7 +780,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) goto fail; } - if ((s->is_multicast || s->local_port <= 0) && (h->flags & AVIO_FLAG_READ)) + if ((s->is_multicast || s->local_port < 0) && (h->flags & AVIO_FLAG_READ)) s->local_port = port; udp_fd = udp_socket_create(h, &my_addr, &len, s->localaddr);