[vlc-devel] How to make relative paths in local xspf playlists work?
    Michael A. Puls II 
    shadow2531 at gmail.com
       
    Thu Jul 30 15:24:44 CEST 2009
    
    
  
In  
<https://trac.videolan.org/vlc/browser/modules/demux/playlist/xspf.c#L90>,  
p_demux->p_sys->psz_base should be initialized to a URI (file: or http:  
for example) representing the directory the xspf file is in.
Then, for the xml:base case at  
<https://trac.videolan.org/vlc/browser/modules/demux/playlist/xspf.c#L213>,  
right before: p_demux->p_sys->psz_base = strdup( psz_value );,  
free(p_demux->p_sys->psz_base); could be added if needed.
I think that would solve the "psz_base should default to the XSPF resource  
location" problem mentioned at  
<https://trac.videolan.org/vlc/browser/modules/demux/playlist/xspf.c#L562>,  
which will make relative paths in local xspf files work.
Or, maybe only do that "if missing (not the current working directory)."
However, how do you get the path to the xspf file (as an absolute URI) so  
that you can do:
"file:///c:/documents%20and%20settings/user/desktop/file.xspf" ->  
"file:///c:/documents%20and%20settings/user/desktop/" to get the base path.
Thanks
-- 
Michael
    
    
More information about the vlc-devel
mailing list