Revision 0ec12335

View differences:

libavformat/udp.c
38 38
    struct sockaddr_in dest_addr;
39 39
#else
40 40
    struct sockaddr_storage dest_addr;
41
    size_t dest_addr_len;
42 41
#endif
42
    size_t dest_addr_len;
43 43
} UDPContext;
44 44

  
45 45
#define UDP_TX_BUF_SIZE 32768
......
234 234
        return AVERROR(EIO);
235 235
    s->dest_addr.sin_family = AF_INET;
236 236
    s->dest_addr.sin_port = htons(port);
237
    s->dest_addr_len = sizeof(s->dest_addr);
237 238
    return 0;
238 239
#endif
239 240
}
......
441 442
    for(;;) {
442 443
        ret = sendto (s->udp_fd, buf, size, 0,
443 444
                      (struct sockaddr *) &s->dest_addr,
444
#ifndef CONFIG_IPV6
445
                      sizeof (s->dest_addr));
446
#else
447 445
                      s->dest_addr_len);
448
#endif
449 446
        if (ret < 0) {
450 447
            if (ff_neterrno() != FF_NETERROR(EINTR) &&
451 448
                ff_neterrno() != FF_NETERROR(EAGAIN))

Also available in: Unified diff