mirror of
https://github.com/mpv-player/mpv
synced 2025-02-09 16:37:24 +00:00
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.
This commit is contained in:
parent
fde0f40e87
commit
580e925011
@ -66,11 +66,6 @@ static struct bstr guess_lang_from_filename(struct bstr name)
|
|||||||
return (struct bstr){name.start + i + 1, n};
|
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
|
* @brief Append all the subtitles in the given path matching fname
|
||||||
* @param opts MPlayer options
|
* @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};
|
char *sub_exts[] = {"utf", "utf8", "utf-8", "idx", "sub", "srt", "smi", "rt", "txt", "ssa", "aqt", "jss", "js", "ass", NULL};
|
||||||
void *tmpmem = talloc_new(NULL);
|
void *tmpmem = talloc_new(NULL);
|
||||||
assert(strlen(fname) < 1e6);
|
|
||||||
|
|
||||||
if (mp_is_url(bstr0(fname)))
|
if (mp_is_url(bstr0(fname)))
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
#ifndef MPLAYER_FIND_SUBFILES_H
|
#ifndef MPLAYER_FIND_SUBFILES_H
|
||||||
#define MPLAYER_FIND_SUBFILES_H
|
#define MPLAYER_FIND_SUBFILES_H
|
||||||
|
|
||||||
#define MAX_SUBTITLE_FILES 128
|
|
||||||
|
|
||||||
struct MPOpts;
|
struct MPOpts;
|
||||||
|
|
||||||
char **find_text_subtitles(struct MPOpts *opts, const char *fname);
|
char **find_text_subtitles(struct MPOpts *opts, const char *fname);
|
||||||
|
Loading…
Reference in New Issue
Block a user