summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-25 04:04:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-25 04:32:49 +0200
commitdca3542d35c8b1769f9fd32641567ffa2346327e (patch)
tree4404c61d6ed7789726ca7ee9203795c9474cff36 /libavformat/udp.c
parente65d6e22e300e286bcc27443df8449aaf9d062dd (diff)
parentb36518dcf457f5655c75c978bffed08dcd9535d6 (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>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c2
1 files changed, 1 insertions, 1 deletions
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)