[vlc-devel] commit: Closes #2875 : relative paths in xspf playlists ( Rafaël Carré )

git version control git at videolan.org
Mon Jun 22 15:45:27 CEST 2009


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Jun 22 15:44:52 2009 +0200| [94477b848c6c4aab2f92a9d772e56b7c974a7541] | committer: Rafaël Carré 

Closes #2875 : relative paths in xspf playlists

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94477b848c6c4aab2f92a9d772e56b7c974a7541
---

 modules/demux/playlist/xspf.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index eee5b85..a5e3679 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -547,8 +547,10 @@ static bool parse_track_node COMPLEX_INTERFACE
                 if( !strcmp( p_handler->name, "location" ) )
                 {
                     char *psz_location = psz_value;
-                    if( !strncmp( psz_value, "file://", 7 ) )
+                    if( !strncmp( psz_value, "file://", 7 ) )   /* file path */
                         psz_location = decode_URI( psz_value + 7 );
+                    else if( !strstr( psz_value, "://" ) )  /* relative path */
+                        psz_location = decode_URI( psz_value );
 
                     if( !psz_location )
                     {




More information about the vlc-devel mailing list