[FFmpeg-cvslog] avformat/udp: don't override 0 localport
Timo Rothenpieler
git at videolan.org
Thu Jul 3 23:18:36 EEST 2025
ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Thu Jun 26 02:37:15 2025 +0200| [23c70e3740b29c42db54f583fefaa2cae4fc360f] | committer: Timo Rothenpieler
avformat/udp: don't override 0 localport
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23c70e3740b29c42db54f583fefaa2cae4fc360f
---
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);
More information about the ffmpeg-cvslog
mailing list