[vlc-commits] commit: playlist: fix FindPrefix() (fix #3863) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Jul 8 18:30:34 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul  8 19:21:35 2010 +0300| [b3a61c8790f3fb0859eb61823ccd606b3540a4c7] | committer: Rémi Denis-Courmont 

playlist: fix FindPrefix() (fix #3863)

We need the invert hack for the core input "file://" decode_URI().

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

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

diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index de14c4a..8446fe4 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -188,14 +188,16 @@ char *FindPrefix( demux_t *p_demux )
     char *psz_file;
     char *psz_prefix;
     char *psz_path;
-    if( p_demux->psz_access )
+
+    if( p_demux->psz_access && *p_demux->psz_access
+     && strcasecmp( p_demux->psz_access, "file" ) )
     {
         if( asprintf( &psz_path,"%s://%s", p_demux->psz_access, p_demux->psz_path ) == -1 )
             return NULL;
     }
     else
     {
-        psz_path = strdup( p_demux->psz_path );
+        psz_path = make_URI( p_demux->psz_path );
         if( psz_path == NULL )
             return NULL;
     }



More information about the vlc-commits mailing list