]> git.sesse.net Git - vlc/commitdiff
core: use make_path in subtile_Detect
authorErwan Tulou <erwan10@videolan.org>
Thu, 11 Feb 2010 16:21:34 +0000 (17:21 +0100)
committerErwan Tulou <erwan10@videolan.org>
Thu, 11 Feb 2010 16:52:10 +0000 (17:52 +0100)
this also solves uri alteration on Windows (recent regression)

src/input/subtitles.c

index f47777c257ddbbdcbc233c4344c41b245a8e8b6b..2ca105ff08618b16702eea71c662e485639ebcd2 100644 (file)
@@ -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;