[FFmpeg-cvslog] udp: Fix local_port management

Luca Barbato git at videolan.org
Mon Jun 22 12:45:44 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun Mar 29 15:19:35 2015 +0200| [61dc9d647c6664e11674d9a10fdde29987d6acda] | committer: Luca Barbato

udp: Fix local_port management

The default value for unset is -1, not 0.

Problem introduced in 66028b7ba6b411ba12ef553e9c8f1f4a4fe27710

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61dc9d647c6664e11674d9a10fdde29987d6acda
---

 libavformat/udp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/udp.c b/libavformat/udp.c
index dfc3b5a..04e60e3 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -519,7 +519,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
             goto fail;
     }
 
-    if ((s->is_multicast || !s->local_port) && (h->flags & AVIO_FLAG_READ))
+    if ((s->is_multicast || s->local_port < 0) && (h->flags & AVIO_FLAG_READ))
         s->local_port = port;
 
     if (localaddr[0])



More information about the ffmpeg-cvslog mailing list