This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 4c9953592f avformat/udp: don't bind sockets to 0.0.0.0 by default for 
unicast UDP inputs
4c9953592f is described below

commit 4c9953592ff55feb917a13f0d3fe14e3f9451584
Author:     Rost Kurylo <[email protected]>
AuthorDate: Tue Jan 13 11:17:57 2026 -0800
Commit:     Marton Balint <[email protected]>
CommitDate: Sat Jan 24 20:26:24 2026 +0000

    avformat/udp: don't bind sockets to 0.0.0.0 by default for unicast UDP 
inputs
---
 libavformat/udp.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavformat/udp.c b/libavformat/udp.c
index 61e80c86c5..0874d18397 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -700,6 +700,7 @@ static int udp_open(URLContext *h, const char *uri, int 
flags)
     struct sockaddr_storage my_addr;
     socklen_t len;
     int ret;
+    const char *bind_addr = NULL;
 
     h->is_streamed = 1;
 
@@ -759,7 +760,12 @@ static int udp_open(URLContext *h, const char *uri, int 
flags)
     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);
+    if (!s->is_multicast && (s->localaddr == NULL || s->localaddr[0] == '\0') 
&& h->flags == AVIO_FLAG_READ)
+        bind_addr = hostname;
+    else
+        bind_addr = s->localaddr;
+
+    udp_fd = udp_socket_create(h, &my_addr, &len, bind_addr);
     if (udp_fd < 0) {
         ret = AVERROR(EIO);
         goto fail;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to