summaryrefslogtreecommitdiffstats
path: root/sub/find_subfiles.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-29 01:49:20 +0200
committerwm4 <wm4@nowhere>2013-05-30 22:44:18 +0200
commit28116b8a799078b3c6b3b559ed4463669c79cf0e (patch)
tree43e78d552443e08d5250774c01a5da245cd2b50f /sub/find_subfiles.c
parentfd02f0f4d88371c728aff3b4487974118ba4d014 (diff)
downloadmpv-28116b8a799078b3c6b3b559ed4463669c79cf0e.tar.bz2
mpv-28116b8a799078b3c6b3b559ed4463669c79cf0e.tar.xz
sub: remove some global variables
Diffstat (limited to 'sub/find_subfiles.c')
-rw-r--r--sub/find_subfiles.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sub/find_subfiles.c b/sub/find_subfiles.c
index e77015114b..3519e5c386 100644
--- a/sub/find_subfiles.c
+++ b/sub/find_subfiles.c
@@ -12,7 +12,6 @@
#include "core/mp_common.h"
#include "sub/find_subfiles.h"
#include "sub/sub.h"
-#include "sub/subreader.h"
static struct bstr strip_ext(struct bstr str)
{
@@ -119,9 +118,9 @@ static void append_dir_subtitles(struct MPOpts *opts,
// does it end with a subtitle extension?
#ifdef CONFIG_ICONV
#ifdef CONFIG_ENCA
- int i = (sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0;
+ int i = (opts->sub_cp && strncasecmp(opts->sub_cp, "enca", 4) != 0) ? 3 : 0;
#else
- int i = sub_cp ? 3 : 0;
+ int i = opts->sub_cp ? 3 : 0;
#endif
#else
int i = 0;
@@ -153,12 +152,12 @@ static void append_dir_subtitles(struct MPOpts *opts,
if (!prio && bstrcmp(tmp_fname_trim, f_fname_trim) == 0)
prio = 3; // matches the movie name
if (!prio && bstr_find(tmp_fname_trim, f_fname_trim) >= 0
- && sub_match_fuzziness >= 1)
+ && opts->sub_match_fuzziness >= 1)
prio = 2; // contains the movie name
if (!prio) {
// doesn't contain the movie name
// don't try in the mplayer subtitle directory
- if (!limit_fuzziness && sub_match_fuzziness >= 2) {
+ if (!limit_fuzziness && opts->sub_match_fuzziness >= 2) {
prio = 1;
}
}