summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-21 23:57:29 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-22 10:11:15 +0300
commitb3a688d45ff463592c73c425d68532f8f9b7880d (patch)
tree92b21c9ceb01b999053c9dd7fce5cf1662f495e1 /subreader.c
parentde5566f0b5420fbdbf0dc37f225be01cfd04cf66 (diff)
downloadmpv-b3a688d45ff463592c73c425d68532f8f9b7880d.tar.bz2
mpv-b3a688d45ff463592c73c425d68532f8f9b7880d.tar.xz
options: move -alang and -slang to option struct
The option field corresponding to -slang is now called "sub_lang" instead of the old misleading global name "dvdsub_lang". The code handling -slang in subreader.c looks rather broken; disable it instead of converting it to use the option field.
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c
index 394cc414cf..f2b52823c2 100644
--- a/subreader.c
+++ b/subreader.c
@@ -53,8 +53,6 @@ int flip_hebrew = 1; ///flip subtitles using fribidi
int fribidi_flip_commas = 0; ///flip comma when fribidi is used
#endif
-extern char* dvdsub_lang;
-
/* Maximal length of line of a subtitle */
#define LINE_LEN 1000
static float mpsub_position=0;
@@ -1888,11 +1886,17 @@ char** sub_filenames(const char* path, char *fname)
strcpy_strip_ext(f_fname_noext, f_fname);
strcpy_trim(f_fname_trim, f_fname_noext);
+ /* The code using sub language here is broken - it assumes strict
+ * "videoname languagename" syntax for the subtitle file, which is
+ * very unlikely to match especially if language name uses "en,de"
+ * syntax... */
tmp_sub_id = NULL;
+#if 0
if (dvdsub_lang && !whiteonly(dvdsub_lang)) {
tmp_sub_id = malloc(strlen(dvdsub_lang)+1);
strcpy_trim(tmp_sub_id, dvdsub_lang);
}
+#endif
// 0 = nothing
// 1 = any subtitle file