# HG changeset patch # User henry # Date 1049834480 0 # Node ID d7b86f7d1406343c43c61dd952b64ad301af0da3 # Parent 3a407acefec5d8a714815a7fd66358d3a335a1a6 turn most of the subtitle matching fuzziness off by default diff -r 3a407acefec5 -r d7b86f7d1406 DOCS/en/mplayer.1 --- a/DOCS/en/mplayer.1 Tue Apr 08 18:05:41 2003 +0000 +++ b/DOCS/en/mplayer.1 Tue Apr 08 20:41:20 2003 +0000 @@ -1081,6 +1081,10 @@ Disables any kind of text post processing done after loading the subtitles. Used for debug purposes. .TP +.B \-subfuzzy +Relax when trying to find matching subtitles. Loads all subtitles in +the current directory, allowing to select the right ones during playing. +.TP .B \-vobsub Specify the VobSub files that are to be used for subtitle. This is the full pathname without extensions, i.e.\& without the '.idx', diff -r 3a407acefec5 -r d7b86f7d1406 cfg-common.h --- a/cfg-common.h Tue Apr 08 18:05:41 2003 +0000 +++ b/cfg-common.h Tue Apr 08 20:41:20 2003 +0000 @@ -212,6 +212,7 @@ {"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL}, {"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL}, {"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"subfuzzy", &subfuzzy_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL}, #endif #ifdef USE_OSD {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, diff -r 3a407acefec5 -r d7b86f7d1406 subreader.c --- a/subreader.c Tue Apr 08 18:05:41 2003 +0000 +++ b/subreader.c Tue Apr 08 20:41:20 2003 +0000 @@ -40,6 +40,8 @@ int sub_no_text_pp=0; // 1 => do not apply text post-processing // like {\...} elimination in SSA format. +int subfuzzy_enabled=0; // be _really_ fuzzy when looking for subtitles + /* Use the SUB_* constant defined in the header file */ int sub_format=SUB_INVALID; #ifdef USE_SORTSUB @@ -1696,7 +1698,7 @@ } else { // doesn't contain the movie name // don't try in the mplayer subtitle directory - if (j == 0) { + if ((j == 0) && subfuzzy_enabled) { sprintf(tmpresult, "%s%s", f_dir, de->d_name); if ((f = fopen(tmpresult, "rt"))) { fclose(f); diff -r 3a407acefec5 -r d7b86f7d1406 subreader.h --- a/subreader.h Tue Apr 08 18:05:41 2003 +0000 +++ b/subreader.h Tue Apr 08 20:41:20 2003 +0000 @@ -3,6 +3,7 @@ extern int suboverlap_enabled; extern int sub_no_text_pp; // disable text post-processing +extern int subfuzzy_enabled; // subtitle formats #define SUB_INVALID -1