Commit 9faee5bc authored by Xuchen Su's avatar Xuchen Su Committed by Steven Liu

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: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent bc0bedf3
...@@ -797,7 +797,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) ...@@ -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 * receiving UDP packets from other sources aimed at the same UDP
* port. This fails on windows. This makes sending to the same address * 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. */ * 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_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len);
} }
/* bind to the local address if not multicast or if the multicast /* bind to the local address if not multicast or if the multicast
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment