]> git.sesse.net Git - vlc/commitdiff
* strip file:// from subtitle autodetect path if present in uri.
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 3 Oct 2004 20:13:56 +0000 (20:13 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Sun, 3 Oct 2004 20:13:56 +0000 (20:13 +0000)
src/input/subtitles.c

index 4eff22609131cef02085b2f59ab025fc3bfe9812..0f161869201d96eaf4507c5f7827a4b625f137b4 100644 (file)
@@ -234,7 +234,6 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
     char *f_dir, *f_fname, *f_fname_noext, *f_fname_trim, *tmp;
     /* variables to be used for derivatives FILE *f */
     char *tmp_fname_noext, *tmp_fname_trim, *tmp_fname_ext, *tmpresult;
-
     vlc_value_t fuzzy;
     int len, i, j, i_sub_count;
     subfn *result; /* unsorted results */
@@ -245,6 +244,11 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
     DIR *d;
     struct dirent *de;
 
+    if( !strncmp( psz_fname, "file://", 7 ) )
+    {
+        psz_fname += 7;
+    }
+
     i_sub_count = 0;
     len = strlen( psz_fname ) > 256 ? strlen( psz_fname ) : 256;