1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-07-16 22:42:38 +02:00

avformat/udp: don't override 0 localport

This commit is contained in:
Timo Rothenpieler
2025-06-26 02:37:15 +02:00
parent 492aef2d94
commit 23c70e3740

View File

@ -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);