[vlc-commits] subtitles: Do as stated in the doc.
    Hugo Beauzée-Luyssen 
    git at videolan.org
       
    Wed Apr 11 19:12:26 CEST 2012
    
    
  
vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 10 16:43:16 2012 +0200| [067cd23ccea9e472b206442404829378219979e2] | committer: Jean-Baptiste Kempf
subtitles: Do as stated in the doc.
("0 = no subtitles autodetected\n")
(cherry picked from commit 8748391fd5f6d31fad420eb7e23d004a55698774)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=067cd23ccea9e472b206442404829378219979e2
---
 src/input/subtitles.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/input/subtitles.c b/src/input/subtitles.c
index e3cecda..82315f8 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -249,7 +249,9 @@ 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 )
 {
-    int i_fuzzy;
+    int i_fuzzy = var_GetInteger( p_this, "sub-autodetect-fuzzy" );
+    if ( i_fuzzy == 0 )
+        return NULL;
     int j, i_result2, i_sub_count, i_fname_len;
     char *f_fname_noext = NULL, *f_fname_trim = NULL;
 
@@ -299,8 +301,6 @@ 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 );
 
-    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 );
     for( j = -1, i_sub_count = 0; (j == -1) || ( j >= 0 && subdirs != NULL && subdirs[j] != NULL ); j++ )
    
    
More information about the vlc-commits
mailing list