| Index: patched-ffmpeg-mt/libavformat/udp.c
|
| ===================================================================
|
| --- patched-ffmpeg-mt/libavformat/udp.c (revision 41250)
|
| +++ patched-ffmpeg-mt/libavformat/udp.c (working copy)
|
| @@ -159,6 +159,7 @@
|
| hints.ai_family = family;
|
| hints.ai_flags = flags;
|
| if ((error = getaddrinfo(node, service, &hints, &res))) {
|
| + res = NULL;
|
| av_log(NULL, AV_LOG_ERROR, "udp_resolve_host: %s\n", gai_strerror(error));
|
| }
|
|
|
| @@ -264,7 +265,7 @@
|
| char hostname[256];
|
| int port;
|
|
|
| - url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
|
| + ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
|
|
|
| /* set the destination address */
|
| s->dest_addr_len = udp_set_url(&s->dest_addr, hostname, port);
|
| @@ -319,9 +320,6 @@
|
|
|
| is_output = (flags & URL_WRONLY);
|
|
|
| - if(!ff_network_init())
|
| - return AVERROR(EIO);
|
| -
|
| s = av_mallocz(sizeof(UDPContext));
|
| if (!s)
|
| return AVERROR(ENOMEM);
|
| @@ -348,9 +346,9 @@
|
| }
|
|
|
| /* fill the dest addr */
|
| - url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
|
| + ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
|
|
|
| - /* XXX: fix url_split */
|
| + /* XXX: fix ff_url_split */
|
| if (hostname[0] == '\0' || hostname[0] == '?') {
|
| /* only accepts null hostname if input */
|
| if (flags & URL_WRONLY)
|
| @@ -481,7 +479,6 @@
|
| if (s->is_multicast && !(h->flags & URL_WRONLY))
|
| udp_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr);
|
| closesocket(s->udp_fd);
|
| - ff_network_close();
|
| av_free(s);
|
| return 0;
|
| }
|
|
|