[vlc-devel] commit: Fix windows compilation (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Aug 14 01:33:12 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at altair.videolan.org> | Thu Aug 14 01:16:27 2008 +0200| [9368859bdfaacc9b5c76965839f494216ceba19e] | committer: Jean-Baptiste Kempf 

Fix windows compilation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9368859bdfaacc9b5c76965839f494216ceba19e
---

 modules/stream_out/standard.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 2bff782..d9d85fa 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -29,7 +29,7 @@
 #endif
 
 #ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
+# define _WIN32_WINNT 0x0500
 #endif
 
 #include <vlc_common.h>
@@ -411,23 +411,20 @@ static int Open( vlc_object_t *p_this )
         char *dhost = var_GetNonEmptyString (p_access, "dst-addr");
         int sport = var_GetInteger (p_access, "src-port");
         int dport = var_GetInteger (p_access, "dst-port");
-        char port[6];
         struct sockaddr_storage src, dst;
         socklen_t srclen = 0, dstlen = 0;
         struct addrinfo *res;
 
-        snprintf (port, sizeof (port), "%d", dport);
-        if (getaddrinfo (dhost, port, &hints, &res) == 0)
+        if ( vlc_getaddrinfo ( VLC_OBJECT(p_stream), dhost, dport, &hints, &res) == 0)
         {
             memcpy (&dst, res->ai_addr, dstlen = res->ai_addrlen);
-            freeaddrinfo (res);
+            vlc_freeaddrinfo (res);
         }
 
-        snprintf (port, sizeof (port), "%d", sport);
-        if (getaddrinfo (shost, port, &hints, &res) == 0)
+        if (vlc_getaddrinfo ( VLC_OBJECT(p_stream), shost, sport, &hints, &res) == 0)
         {
             memcpy (&src, res->ai_addr, srclen = res->ai_addrlen);
-            freeaddrinfo (res);
+            vlc_freeaddrinfo (res);
         }
 
         char *head = vlc_sdp_Start (VLC_OBJECT (p_stream), SOUT_CFG_PREFIX,




More information about the vlc-devel mailing list