]> git.sesse.net Git - vlc/blobdiff - src/input/subtitles.c
Fixed sanetizing of file name in input_CreateFilename.
[vlc] / src / input / subtitles.c
index a5364cc2378cfe3a6743931fc3eecae90676a342..c721a7958ef3cdbd0f695d973620c3702638fcb3 100644 (file)
@@ -251,7 +251,7 @@ static char **paths_to_list( const char *psz_dir, char *psz_path )
 char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
                          const char *psz_name_org )
 {
-    vlc_value_t fuzzy;
+    int i_fuzzy;
     int j, i_result2, i_sub_count, i_fname_len;
     char *f_dir = NULL, *f_fname = NULL, *f_fname_noext = NULL, *f_fname_trim = NULL;
     char *tmp = NULL;
@@ -315,7 +315,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
     strcpy_strip_ext( f_fname_noext, f_fname );
     strcpy_trim( f_fname_trim, f_fname_noext );
 
-    var_Get( p_this, "sub-autodetect-fuzzy", &fuzzy );
+    i_fuzzy = var_GetInteger( p_this, "sub-autodetect-fuzzy" );
 
     result = calloc( MAX_SUBTITLE_FILES+1, sizeof(vlc_subfn_t) ); /* We check it later (simplify code) */
     subdirs = paths_to_list( f_dir, psz_path );
@@ -382,7 +382,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
                 /* doesn't contain the movie name, prefer files in f_dir over subdirs */
                 i_prio = SUB_PRIORITY_MATCH_NONE;
             }
-            if( i_prio >= fuzzy.i_int )
+            if( i_prio >= i_fuzzy )
             {
                 char psz_path[strlen( psz_dir ) + strlen( psz_name ) + 1];
                 struct stat st;