[vlc-devel] RE : [PATCH] -- correct broken URI for Windows(trac#2843)
brezhoneg1
brezhoneg1 at yahoo.fr
Thu Jun 11 09:33:42 CEST 2009
> -----Message d'origine-----
> De : vlc-devel-bounces at videolan.org [mailto:vlc-devel-
> bounces at videolan.org] De la part de xxcv
> Envoyé : jeudi 11 juin 2009 00:58
> À : Mailing list for VLC media player developers
> Objet : Re: [vlc-devel] [PATCH] -- correct broken URI for
> Windows(trac#2843)
>
> brezhoneg1 wrote:
> >
> > This patch corrects URI handling for Windows, which has been
preventing
> > xspf from working on both 1.0-bugfix and master for some time.
> >
> > The patch does assume a Windows URI is in the form of
> > /C:/path/to/file/file.ext
> >
> > +#ifdef WIN32
> > + if ( strlen (psz) > 2 &&
> > + (psz[0] == '/') && isalpha (psz[1]) && (psz[2] == ':'))
> > + {
> > + in++;
> > + }
> > +#endif
> This should probably be in the demux playlist xspf (xml win32
problem?)
> module?
> > + case '/':
> > + *out++ = DIR_SEP_CHAR;
> > + break;
> Some other url functions also use decode_uri ... so this would be
> incorrect for urls?
> ---
> include/vlc_url.h: decode_URI( url->psz_password );
> ---
Yes, I wrongly assumed make_URI/decode_URI were the two opposite
functions.
Make_URI is a bit misleading (only used twice and designed for path and
filename only). I propose the following :
- rename make_URI into encode_URI_path
- create the opposite decode_URI_path
btw, decode_URI is also a bit misleading, because the opposite function
is in fact encode_URI_component, and both cannot work for path on
Windows
Any comments ?
Rgds
Erwan10
More information about the vlc-devel
mailing list