sub: remove .txt as text subtitle extension

If used with fuzzy matching, the player tends to pick up random text
files, sometimes with interesting results.

The most interesting interaction is when the user uses
--log-file=something.txt, and mpv tries to open its own log file. It
essentially "freezes" during probing, because every time it reads from
it, it will write some more data, which in turn will cause more data to
be read - until the 2MB max. probing size is slowly reached. This is not
even an obscure corner case, but happened to multiple users.

The .txt extension has been considered a subtitle extension ever since
the code was added to MPlayer's subreader.c, but I'm not seeing many
actual subtitle files with this extension, so just get rid of it.
This commit is contained in:
wm4 2017-02-03 11:32:16 +01:00
parent 1ec6cd89b9
commit 50991fac81
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@
#include "external_files.h"
static const char *const sub_exts[] = {"utf", "utf8", "utf-8", "idx", "sub", "srt",
"smi", "rt", "txt", "ssa", "aqt", "jss",
"smi", "rt", "ssa", "aqt", "jss",
"js", "ass", "mks", "vtt", "sup", "scc",
NULL};