From fc66e231541b91b22f6e0d8257991cc5343db8d5 Mon Sep 17 00:00:00 2001 From: Can Wu Date: Fri, 17 Jun 2011 13:58:01 +0800 Subject: [PATCH 1/2] udp: Receive on the remote port number, if no local port is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For a unicast udp stream to localhost:1234, currently ffplay udp://:1234?localport=1234 works, but ffplay udp://:1234 doesn't work. Signed-off-by: Martin Storsjö --- libavformat/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index d6522bf0be..724ff0197d 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -365,7 +365,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) goto fail; } - if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) + if ((s->is_multicast || !s->local_port) && (h->flags & AVIO_FLAG_READ)) s->local_port = port; udp_fd = udp_socket_create(s, &my_addr, &len); if (udp_fd < 0) From b36518dcf457f5655c75c978bffed08dcd9535d6 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 24 Jun 2011 21:16:10 +0200 Subject: [PATCH 2/2] configure: Add -Wno-format-zero-length to CFLAGS. The C standard specifies that zero-length format strings are allowed. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index f557482c18..e20bb064a4 100755 --- a/configure +++ b/configure @@ -2978,6 +2978,7 @@ check_cflags -Wdeclaration-after-statement check_cflags -Wall check_cflags -Wno-parentheses check_cflags -Wno-switch +check_cflags -Wno-format-zero-length check_cflags -Wdisabled-optimization check_cflags -Wpointer-arith check_cflags -Wredundant-decls