From c783e58e912da6b1a54c584d370b9720545cef6b Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 31 May 2009 13:09:48 +0000 Subject: Using nl_langinfo in the asf mmst implementation makes no sense since MPlayer does not use setlocale. Just default to UTF-8 as input charset until there is a better solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29333 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/asf_mmst_streaming.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'stream') diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 0fb7179948..6d764617a4 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -49,9 +49,6 @@ #ifdef CONFIG_ICONV #include -#ifdef HAVE_LANGINFO -#include -#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); -- cgit v1.2.3 From bf67bb10a18c0c3b428aaa979b33a4c35f10f240 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 3 Jun 2009 14:06:10 +0000 Subject: Files should be opened in binary mode on OS/2. patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29346 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'stream') diff --git a/stream/stream_file.c b/stream/stream_file.c index e1f77bc2ab..e113e6788e 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_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN); 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 } -- cgit v1.2.3 From 437efdc855d2ccf83d482f40a90041609e7ac373 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 26 Jun 2009 13:54:22 +0000 Subject: Replace incorrect use of strncpy by av_strlcpy. Only a real issue if inet_ntoa can actually return a string of more than 255 bytes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29393 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stream') diff --git a/stream/tcp.c b/stream/tcp.c index b299e9d66f..ff4db78847 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 -- cgit v1.2.3