diff options
Diffstat (limited to 'stream')
-rw-r--r-- | stream/asf_mmst_streaming.c | 9 | ||||
-rw-r--r-- | stream/stream_file.c | 6 | ||||
-rw-r--r-- | stream/tcp.c | 3 |
3 files changed, 6 insertions, 12 deletions
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index ec6ba83264..a32938a871 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -49,9 +49,6 @@ #ifdef CONFIG_ICONV #include <iconv.h> -#ifdef HAVE_LANGINFO -#include <langinfo.h> -#endif #endif #include "url.h" @@ -574,11 +571,7 @@ int asf_mmst_streaming_start(stream_t *stream) /* prepare for the url encoding conversion */ #ifdef CONFIG_ICONV -#ifdef HAVE_LANGINFO - url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); -#else - url_conv = iconv_open("UTF-16LE", NULL); -#endif + url_conv = iconv_open("UTF-16LE", "UTF-8"); #endif snprintf (str, 1023, "\034\003NSPlayer/7.0.0.1956; {33715801-BAB3-9D85-24E9-03B90328270A}; Host: %s", url1->hostname); diff --git a/stream/stream_file.c b/stream/stream_file.c index bc1e7a4381..9514204a3b 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -119,7 +119,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { filename++; #endif -#if defined(__CYGWIN__)|| defined(__MINGW32__) +#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__) m |= O_BINARY; #endif @@ -128,13 +128,13 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { // read from stdin mp_tmsg(MSGT_OPEN,MSGL_INFO,"Reading from stdin...\n"); f=0; // 0=stdin -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(__OS2__) setmode(fileno(stdin),O_BINARY); #endif } else { mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n"); f=1; -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(__OS2__) setmode(fileno(stdout),O_BINARY); #endif } diff --git a/stream/tcp.c b/stream/tcp.c index 7566f5b309..0291fba544 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -33,6 +33,7 @@ #include "network.h" #include "stream.h" #include "tcp.h" +#include "libavutil/avstring.h" /* IPv6 options */ int network_prefer_ipv4 = 0; @@ -163,7 +164,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { } #if HAVE_INET_ATON || defined(HAVE_WINSOCK2_H) - strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); + av_strlcpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); #else inet_ntop(af, our_s_addr, buf, 255); #endif |