libavformat/udp.c:533: error: Uninitialized Value
  The value read from localaddr[_] was never initialized.

libavformat/udp.c:533:9: 
531.         s->local_port = port;
532. 
533.     if (localaddr[0])
             ^
534.         udp_fd = udp_socket_create(h, &my_addr, &len, localaddr);
535.     else

static int udp_open(URLContext *h, const char *uri, int flags)
{
    char hostname[1024], localaddr[1024] = "";
    int port, udp_fd = -1, tmp, bind_ret = -1;
    UDPContext *s = h->priv_data;
    int is_output;
    const char *p;
    char buf[256];
    struct sockaddr_storage my_addr;
    socklen_t len;
    int i, num_include_sources = 0, num_exclude_sources = 0;
    char *include_sources[32], *exclude_sources[32];
    h->is_streamed = 1;
    h->max_packet_size = 1472;
    is_output = !(flags & AVIO_FLAG_READ);
    if (s->buffer_size < 0)
        s->buffer_size = is_output ? UDP_TX_BUF_SIZE : UDP_MAX_PKT_SIZE;
    if (s->sources) {
        if (parse_source_list(s->sources, include_sources,
                              &num_include_sources,
                              FF_ARRAY_ELEMS(include_sources)))
            goto fail;
    }
    if (s->block) {
        if (parse_source_list(s->block, exclude_sources, &num_exclude_sources,
                              FF_ARRAY_ELEMS(exclude_sources)))
            goto fail;
    }
    if (s->pkt_size > 0)
        h->max_packet_size = s->pkt_size;
    p = strchr(uri, '?');
    if (p) {
        if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {
            char *endptr = NULL;
            s->reuse_socket = strtol(buf, &endptr, 10);
            if (buf == endptr)
                s->reuse_socket = 1;
        }
        if (av_find_info_tag(buf, sizeof(buf), "ttl", p)) {
            s->ttl = strtol(buf, NULL, 10);
        }
        if (av_find_info_tag(buf, sizeof(buf), "localport", p)) {
            s->local_port = strtol(buf, NULL, 10);
        }
        if (av_find_info_tag(buf, sizeof(buf), "pkt_size", p)) {
            h->max_packet_size = strtol(buf, NULL, 10);
        }
        if (av_find_info_tag(buf, sizeof(buf), "buffer_size", p)) {
            s->buffer_size = strtol(buf, NULL, 10);
        }
        if (av_find_info_tag(buf, sizeof(buf), "connect", p)) {
            s->is_connected = strtol(buf, NULL, 10);
        }
        if (av_find_info_tag(buf, sizeof(buf), "localaddr", p)) {
            av_strlcpy(localaddr, buf, sizeof(localaddr));
        }
        if (av_find_info_tag(buf, sizeof(buf), "sources", p)) {
            if (parse_source_list(buf, include_sources, &num_include_sources,
                                  FF_ARRAY_ELEMS(include_sources)))
                goto fail;
        }
        if (av_find_info_tag(buf, sizeof(buf), "block", p)) {
            if (parse_source_list(buf, exclude_sources, &num_exclude_sources,
                                  FF_ARRAY_ELEMS(exclude_sources)))
                goto fail;
        }
    }
    av_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
    if (hostname[0] == '\0' || hostname[0] == '?') {
        if (!(flags & AVIO_FLAG_READ))
            goto fail;
    } else {
        if (ff_udp_set_remote_url(h, uri) < 0)
            goto fail;
    }
    if ((s->is_multicast || s->local_port < 0) && (h->flags & AVIO_FLAG_READ))
        s->local_port = port;
    if (localaddr[0])
        udp_fd = udp_socket_create(h, &my_addr, &len, localaddr);
    else
        udp_fd = udp_socket_create(h, &my_addr, &len, s->localaddr);
    if (udp_fd < 0)
        goto fail;
    if (s->reuse_socket > 0 || (s->is_multicast && s->reuse_socket < 0)) {
        s->reuse_socket = 1;
        if (setsockopt (udp_fd, SOL_SOCKET, SO_REUSEADDR, &(s->reuse_socket), sizeof(s->reuse_socket)) != 0)
            goto fail;
    }
    if (s->is_multicast && !(h->flags & AVIO_FLAG_WRITE)) {
        bind_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len);
    }
    if (bind_ret < 0 && bind(udp_fd,(struct sockaddr *)&my_addr, len) < 0) {
        log_net_error(h, AV_LOG_ERROR, "bind failed");
        goto fail;
    }
    len = sizeof(my_addr);
    getsockname(udp_fd, (struct sockaddr *)&my_addr, &len);
    s->local_port = udp_port(&my_addr, len);
    if (s->is_multicast) {
        if (h->flags & AVIO_FLAG_WRITE) {
            if (udp_set_multicast_ttl(udp_fd, s->ttl, (struct sockaddr *)&s->dest_addr) < 0)
                goto fail;
        }
        if (h->flags & AVIO_FLAG_READ) {
            if (num_include_sources && num_exclude_sources) {
                av_log(h, AV_LOG_ERROR, "Simultaneously including and excluding multicast sources is not supported\n");
                goto fail;
            }
            if (num_include_sources) {
                if (udp_set_multicast_sources(h, udp_fd,
                                              (struct sockaddr *)&s->dest_addr,
                                              s->dest_addr_len,
                                              include_sources,
                                              num_include_sources, 1) < 0)
                    goto fail;
            } else {
                if (udp_join_multicast_group(udp_fd, (struct sockaddr *)&s->dest_addr) < 0)
                    goto fail;
            }
            if (num_exclude_sources) {
                if (udp_set_multicast_sources(h, udp_fd,
                                              (struct sockaddr *)&s->dest_addr,
                                              s->dest_addr_len,
                                              exclude_sources,
                                              num_exclude_sources, 0) < 0)
                    goto fail;
            }
        }
    }
    if (is_output) {
        tmp = s->buffer_size;
        if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp)) < 0) {
            log_net_error(h, AV_LOG_ERROR, "setsockopt(SO_SNDBUF)");
            goto fail;
        }
    } else {
        tmp = s->buffer_size;
        if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) {
            log_net_error(h, AV_LOG_WARNING, "setsockopt(SO_RECVBUF)");
        }
        ff_socket_nonblock(udp_fd, 1);
    }
    if (s->is_connected) {
        if (connect(udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) {
            log_net_error(h, AV_LOG_ERROR, "connect");
            goto fail;
        }
    }
    for (i = 0; i < num_include_sources; i++)
        av_freep(&include_sources[i]);
    for (i = 0; i < num_exclude_sources; i++)
        av_freep(&exclude_sources[i]);
    s->udp_fd = udp_fd;
    return 0;
 fail:
    if (udp_fd >= 0)
        closesocket(udp_fd);
    for (i = 0; i < num_include_sources; i++)
        av_freep(&include_sources[i]);
    for (i = 0; i < num_exclude_sources; i++)
        av_freep(&exclude_sources[i]);
    return AVERROR(EIO);
}
['static int udp_open(URLContext *h, const char *uri, int flags)\n{\n    char hostname[1024], localaddr[1024] = "";\n    int port, udp_fd = -1, tmp, bind_ret = -1;\n    UDPContext *s = h->priv_data;\n    int is_output;\n    const char *p;\n    char buf[256];\n    struct sockaddr_storage my_addr;\n    socklen_t len;\n    int i, num_include_sources = 0, num_exclude_sources = 0;\n    char *include_sources[32], *exclude_sources[32];\n    h->is_streamed = 1;\n    h->max_packet_size = 1472;\n    is_output = !(flags & AVIO_FLAG_READ);\n    if (s->buffer_size < 0)\n        s->buffer_size = is_output ? UDP_TX_BUF_SIZE : UDP_MAX_PKT_SIZE;\n    if (s->sources) {\n        if (parse_source_list(s->sources, include_sources,\n                              &num_include_sources,\n                              FF_ARRAY_ELEMS(include_sources)))\n            goto fail;\n    }\n    if (s->block) {\n        if (parse_source_list(s->block, exclude_sources, &num_exclude_sources,\n                              FF_ARRAY_ELEMS(exclude_sources)))\n            goto fail;\n    }\n    if (s->pkt_size > 0)\n        h->max_packet_size = s->pkt_size;\n    p = strchr(uri, \'?\');\n    if (p) {\n        if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {\n            char *endptr = NULL;\n            s->reuse_socket = strtol(buf, &endptr, 10);\n            if (buf == endptr)\n                s->reuse_socket = 1;\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "ttl", p)) {\n            s->ttl = strtol(buf, NULL, 10);\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "localport", p)) {\n            s->local_port = strtol(buf, NULL, 10);\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "pkt_size", p)) {\n            h->max_packet_size = strtol(buf, NULL, 10);\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "buffer_size", p)) {\n            s->buffer_size = strtol(buf, NULL, 10);\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "connect", p)) {\n            s->is_connected = strtol(buf, NULL, 10);\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "localaddr", p)) {\n            av_strlcpy(localaddr, buf, sizeof(localaddr));\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "sources", p)) {\n            if (parse_source_list(buf, include_sources, &num_include_sources,\n                                  FF_ARRAY_ELEMS(include_sources)))\n                goto fail;\n        }\n        if (av_find_info_tag(buf, sizeof(buf), "block", p)) {\n            if (parse_source_list(buf, exclude_sources, &num_exclude_sources,\n                                  FF_ARRAY_ELEMS(exclude_sources)))\n                goto fail;\n        }\n    }\n    av_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);\n    if (hostname[0] == \'\\0\' || hostname[0] == \'?\') {\n        if (!(flags & AVIO_FLAG_READ))\n            goto fail;\n    } else {\n        if (ff_udp_set_remote_url(h, uri) < 0)\n            goto fail;\n    }\n    if ((s->is_multicast || s->local_port < 0) && (h->flags & AVIO_FLAG_READ))\n        s->local_port = port;\n    if (localaddr[0])\n        udp_fd = udp_socket_create(h, &my_addr, &len, localaddr);\n    else\n        udp_fd = udp_socket_create(h, &my_addr, &len, s->localaddr);\n    if (udp_fd < 0)\n        goto fail;\n    if (s->reuse_socket > 0 || (s->is_multicast && s->reuse_socket < 0)) {\n        s->reuse_socket = 1;\n        if (setsockopt (udp_fd, SOL_SOCKET, SO_REUSEADDR, &(s->reuse_socket), sizeof(s->reuse_socket)) != 0)\n            goto fail;\n    }\n    if (s->is_multicast && !(h->flags & AVIO_FLAG_WRITE)) {\n        bind_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len);\n    }\n    if (bind_ret < 0 && bind(udp_fd,(struct sockaddr *)&my_addr, len) < 0) {\n        log_net_error(h, AV_LOG_ERROR, "bind failed");\n        goto fail;\n    }\n    len = sizeof(my_addr);\n    getsockname(udp_fd, (struct sockaddr *)&my_addr, &len);\n    s->local_port = udp_port(&my_addr, len);\n    if (s->is_multicast) {\n        if (h->flags & AVIO_FLAG_WRITE) {\n            if (udp_set_multicast_ttl(udp_fd, s->ttl, (struct sockaddr *)&s->dest_addr) < 0)\n                goto fail;\n        }\n        if (h->flags & AVIO_FLAG_READ) {\n            if (num_include_sources && num_exclude_sources) {\n                av_log(h, AV_LOG_ERROR, "Simultaneously including and excluding multicast sources is not supported\\n");\n                goto fail;\n            }\n            if (num_include_sources) {\n                if (udp_set_multicast_sources(h, udp_fd,\n                                              (struct sockaddr *)&s->dest_addr,\n                                              s->dest_addr_len,\n                                              include_sources,\n                                              num_include_sources, 1) < 0)\n                    goto fail;\n            } else {\n                if (udp_join_multicast_group(udp_fd, (struct sockaddr *)&s->dest_addr) < 0)\n                    goto fail;\n            }\n            if (num_exclude_sources) {\n                if (udp_set_multicast_sources(h, udp_fd,\n                                              (struct sockaddr *)&s->dest_addr,\n                                              s->dest_addr_len,\n                                              exclude_sources,\n                                              num_exclude_sources, 0) < 0)\n                    goto fail;\n            }\n        }\n    }\n    if (is_output) {\n        tmp = s->buffer_size;\n        if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp)) < 0) {\n            log_net_error(h, AV_LOG_ERROR, "setsockopt(SO_SNDBUF)");\n            goto fail;\n        }\n    } else {\n        tmp = s->buffer_size;\n        if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) {\n            log_net_error(h, AV_LOG_WARNING, "setsockopt(SO_RECVBUF)");\n        }\n        ff_socket_nonblock(udp_fd, 1);\n    }\n    if (s->is_connected) {\n        if (connect(udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) {\n            log_net_error(h, AV_LOG_ERROR, "connect");\n            goto fail;\n        }\n    }\n    for (i = 0; i < num_include_sources; i++)\n        av_freep(&include_sources[i]);\n    for (i = 0; i < num_exclude_sources; i++)\n        av_freep(&exclude_sources[i]);\n    s->udp_fd = udp_fd;\n    return 0;\n fail:\n    if (udp_fd >= 0)\n        closesocket(udp_fd);\n    for (i = 0; i < num_include_sources; i++)\n        av_freep(&include_sources[i]);\n    for (i = 0; i < num_exclude_sources; i++)\n        av_freep(&exclude_sources[i]);\n    return AVERROR(EIO);\n}']