From 78dbd8ba260260585650a4b7a748f0e600771b6d Mon Sep 17 00:00:00 2001 From: iive Date: Mon, 20 Aug 2007 14:17:43 +0000 Subject: remove gconvert_uri_to_filename() and use url_unescape_string() instead. reasons: * gconvert strdup()s the original string, but it may exit without returning or freeing it. * gconvert returns the original pointer when no % escaping is done. It is then free()ed and used in that state. * gconvert doesn't consider that % may be at the end of the string and could continue parsing past the end. * gconvert would try to free() pointer that iconv() have modified. * gconvert would try to convert filenames from utf-8 to iso8859-1. Seems like no other DnD programs convert to utf-8 and/or honors CHARSET. Not converting seems to work best. Fix it if problem arises. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24106 b3059339-0415-0410-9bf9-f77b7e298cf2 --- gui/mplayer/mw.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gui/mplayer/mw.c') diff --git a/gui/mplayer/mw.c b/gui/mplayer/mw.c index 1762eea45d..4a72480d60 100644 --- a/gui/mplayer/mw.c +++ b/gui/mplayer/mw.c @@ -20,6 +20,7 @@ #include "../libvo/fastmemcpy.h" #include "../stream/stream.h" +#include "stream/url.h" #include "../mixer.h" #include "../libvo/sub.h" #include "../access_mpcontext.h" @@ -559,13 +560,7 @@ void mplDandDHandler(int num,char** files) char* str = strdup( files[f] ); plItem* item; -#ifdef USE_ICONV - if ( strchr( str,'%' ) ) - { - char * tmp=gconvert_uri_to_filename( str ); - free( str ); str=tmp; - } -#endif + url_unescape_string(str, files[f]); if(stat(str,&buf) == 0 && S_ISDIR(buf.st_mode) == 0) { /* this is not a directory so try to play it */ -- cgit v1.2.3