Commit f27683f4 authored by Laurent Aimar's avatar Laurent Aimar

Removed var_Get in subtitles.c

parent 8b0c5ca4
...@@ -251,7 +251,7 @@ static char **paths_to_list( const char *psz_dir, char *psz_path ) ...@@ -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, char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
const char *psz_name_org ) const char *psz_name_org )
{ {
vlc_value_t fuzzy; int i_fuzzy;
int j, i_result2, i_sub_count, i_fname_len; 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 *f_dir = NULL, *f_fname = NULL, *f_fname_noext = NULL, *f_fname_trim = NULL;
char *tmp = NULL; char *tmp = NULL;
...@@ -315,7 +315,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path, ...@@ -315,7 +315,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
strcpy_strip_ext( f_fname_noext, f_fname ); strcpy_strip_ext( f_fname_noext, f_fname );
strcpy_trim( f_fname_trim, f_fname_noext ); 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) */ result = calloc( MAX_SUBTITLE_FILES+1, sizeof(vlc_subfn_t) ); /* We check it later (simplify code) */
subdirs = paths_to_list( f_dir, psz_path ); subdirs = paths_to_list( f_dir, psz_path );
...@@ -382,7 +382,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *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 */ /* doesn't contain the movie name, prefer files in f_dir over subdirs */
i_prio = SUB_PRIORITY_MATCH_NONE; 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]; char psz_path[strlen( psz_dir ) + strlen( psz_name ) + 1];
struct stat st; struct stat st;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment