[MPlayer-dev-eng] [PATCH] ftp charset selection support

Andrew Savchenko Bircoph at list.ru
Sat Apr 12 18:32:06 CEST 2008


Hi,

On Saturday 12 April 2008 12:42, Reimar Döffinger wrote:
> On Sat, Apr 12, 2008 at 05:45:59AM +0400, Andrew Savchenko wrote:
> > I've found that function for filename recoding already exists:
> > filename_recode() in mp_msg.c, so I changed it in order to
> > recode from arbitrary initial encoding to arbitrary final one.
>
> IMO, since filename_recode is not thread safe, it should only be
> used for _printing_ stuff, never for actually important code,
> and preferably even that only from as few places as possible.

Yes, original filename_recode() isn't thread safe, but I moved 
static iconv_t handle out of the filename_recode_common() and, 
when used for ftp purposes, I save buffer with recoded filename to 
an external buffer. 

Moreover in my next patch I will move static buffer for 
recoded_filename out of filename_recode_common() to 
filename_recode(). Thus filename_recode_common() will be thread 
safe completely.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080412/0fc147b9/attachment.pgp>


More information about the MPlayer-dev-eng mailing list