Michael A. Puls II
2009-07-30 13:24:44 UTC
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
<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
Michael