aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-03-08 15:31:45 +0200
committerMartin Storsjö <martin@martin.st>2012-03-09 15:04:05 +0200
commit2bfd92b33089b38ce73f845a3b30f94688742fd4 (patch)
tree319ad808de72278e9b1b39904814c5a842173148 /libavformat
parentc700fdb00f28a65c42b37c43d82a29733f1cc20e (diff)
downloadffmpeg-2bfd92b33089b38ce73f845a3b30f94688742fd4.tar.gz
udp: Set ttl for read-write streams, too, not only for write-only ones
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/udp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 3c63f516a2..37b76559e9 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;