summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorXuchen Su <xuchen.su@qq.com>2019-11-26 15:02:06 +0800
committerSteven Liu <lq@chinaffmpeg.org>2020-01-20 14:28:56 +0800
commit9faee5bc148fdf4d5340cdcf7e464078972dc72c (patch)
tree39a7837cb6b7a1e931994da1d86daaa04ee89d97 /libavformat/udp.c
parentbc0bedf3c950fc5203d0d2b62019fb49edc48fb7 (diff)
downloadffmpeg-9faee5bc148fdf4d5340cdcf7e464078972dc72c.tar.gz
avformat/udp: modify the not write-only to read-only mode.
not write-only include read-write pseudo flag. so make the flag read-only Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
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 f4ec148a2f..1ab576e80e 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -797,7 +797,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
* receiving UDP packets from other sources aimed at the same UDP
* port. This fails on windows. This makes sending to the same address
* using sendto() fail, so only do it if we're opened in read-only mode. */
- if (s->is_multicast && !(h->flags & AVIO_FLAG_WRITE)) {
+ if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) {
bind_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len);
}
/* bind to the local address if not multicast or if the multicast