---
libavformat/udp.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 3c63f51..37b7655 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -400,11 +400,12 @@ static int udp_open(URLContext *h, const char *uri, int
flags)
s->local_port = udp_port(&my_addr, len);
if (s->is_multicast) {
- if (!(h->flags & AVIO_FLAG_READ)) {
+ if (h->flags & AVIO_FLAG_WRITE) {
/* output */
if (udp_set_multicast_ttl(udp_fd, s->ttl, (struct sockaddr
*)&s->dest_addr) < 0)
goto fail;
- } else {
+ }
+ if (h->flags & AVIO_FLAG_READ) {
/* input */
if (udp_join_multicast_group(udp_fd, (struct sockaddr
*)&s->dest_addr) < 0)
goto fail;
--
1.7.3.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel