[vlc-devel] commit: core: use make_path in subtile_Detect (Erwan Tulou )

git version control git at videolan.org
Thu Feb 11 17:52:53 CET 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Feb 11 17:21:34 2010 +0100| [8d5e7cc89b89c12e9fceaae03dfab5f63421c27d] | committer: Erwan Tulou 

core: use make_path in subtile_Detect

this also solves uri alteration on Windows (recent regression)

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

 src/input/subtitles.c |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/src/input/subtitles.c b/src/input/subtitles.c
index f47777c..2ca105f 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -262,22 +262,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
     if( !psz_name_org )
         return NULL;
 
-    if( !strncmp( psz_name_org, "file://", 7 ) )
-    {
-        psz_name_org += 7;
-#if defined( WIN32 )
-        psz_name_org ++ ;
-#endif
-        if( !strncmp( psz_name_org, "localhost", 9 ) )
-            psz_name_org += 9;
-    }
-
-#if (DIR_SEP_CHAR != '/')
-        /* Turn slashes into anti-slashes */
-        for( char *s = strchr( psz_name_org, '/' ); s; s = strchr( s + 1, '/' ) )
-            *s = DIR_SEP_CHAR;
-#endif
-    char *psz_fname = decode_URI_duplicate( psz_name_org );
+    char *psz_fname = make_path( psz_name_org );
     if( !psz_fname )
         return NULL;
 




More information about the vlc-devel mailing list