diff options
author | Michael Niedermayer | 2011-06-25 04:04:53 +0200 |
---|---|---|
committer | Michael Niedermayer | 2011-06-25 04:32:49 +0200 |
commit | dca3542d35c8b1769f9fd32641567ffa2346327e (patch) | |
tree | 4404c61d6ed7789726ca7ee9203795c9474cff36 | |
parent | e65d6e22e300e286bcc27443df8449aaf9d062dd (diff) | |
parent | b36518dcf457f5655c75c978bffed08dcd9535d6 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: Add -Wno-format-zero-length to CFLAGS.
udp: Receive on the remote port number, if no local port is set
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | libavformat/udp.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -3035,6 +3035,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 diff --git a/libavformat/udp.c b/libavformat/udp.c index 7c18fb7bf0..21b4455948 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -444,7 +444,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) |