summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-07 20:24:18 +0200
committerwm4 <wm4@nowhere>2013-09-07 20:34:49 +0200
commit580e9250111223b33d2e9ac49e9c484fcea5b018 (patch)
treec21f33db253d7e82dc463f06f3d70ea29b84cf04 /sub
parentfde0f40e873c9539e6554da8288b4912b8e0666c (diff)
downloadmpv-580e9250111223b33d2e9ac49e9c484fcea5b018.tar.bz2
mpv-580e9250111223b33d2e9ac49e9c484fcea5b018.tar.xz
find_subfiles: some cleanups
Remove a crap assert() (what... either it can't happen, or it should error or at least abort() if it can't be handled). Remove some dead definitions.
Diffstat (limited to 'sub')
-rw-r--r--sub/find_subfiles.c6
-rw-r--r--sub/find_subfiles.h2
2 files changed, 0 insertions, 8 deletions
diff --git a/sub/find_subfiles.c b/sub/find_subfiles.c
index 2af7dafbd7..ab44f24671 100644
--- a/sub/find_subfiles.c
+++ b/sub/find_subfiles.c
@@ -66,11 +66,6 @@ static struct bstr guess_lang_from_filename(struct bstr name)
return (struct bstr){name.start + i + 1, n};
}
-struct sub_list {
- struct subfn subs[MAX_SUBTITLE_FILES];
- void *ctx;
-};
-
/**
* @brief Append all the subtitles in the given path matching fname
* @param opts MPlayer options
@@ -87,7 +82,6 @@ static void append_dir_subtitles(struct MPOpts *opts,
{
char *sub_exts[] = {"utf", "utf8", "utf-8", "idx", "sub", "srt", "smi", "rt", "txt", "ssa", "aqt", "jss", "js", "ass", NULL};
void *tmpmem = talloc_new(NULL);
- assert(strlen(fname) < 1e6);
if (mp_is_url(bstr0(fname)))
goto out;
diff --git a/sub/find_subfiles.h b/sub/find_subfiles.h
index 6d68d6140c..30a26bb596 100644
--- a/sub/find_subfiles.h
+++ b/sub/find_subfiles.h
@@ -19,8 +19,6 @@
#ifndef MPLAYER_FIND_SUBFILES_H
#define MPLAYER_FIND_SUBFILES_H
-#define MAX_SUBTITLE_FILES 128
-
struct MPOpts;
char **find_text_subtitles(struct MPOpts *opts, const char *fname);