diff options
author | wm4 <wm4@nowhere> | 2016-08-10 22:22:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-08-10 22:22:50 +0200 |
commit | 87190969a758d7c20c39a456f05926bff42ac533 (patch) | |
tree | c51fc6c3c34dabb0a76186d463b5b0ab38664946 /player | |
parent | 367e9fb7f1e2143607a6d1ae0c1db5765c5f003b (diff) | |
download | mpv-87190969a758d7c20c39a456f05926bff42ac533.tar.bz2 mpv-87190969a758d7c20c39a456f05926bff42ac533.tar.xz |
player: add --no-autoload-files option
Allt his auto-loading is getting annoying especially for testing.
Diffstat (limited to 'player')
-rw-r--r-- | player/loadfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index 75c5499369..590839c799 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -296,6 +296,8 @@ static int match_lang(char **langs, char *lang) static bool compare_track(struct track *t1, struct track *t2, char **langs, struct MPOpts *opts) { + if (!opts->autoload_files && t1->is_external != t2->is_external) + return !t1->is_external; bool ext1 = t1->is_external && !t1->no_default; bool ext2 = t2->is_external && !t2->no_default; if (ext1 != ext2) @@ -354,6 +356,8 @@ struct track *select_default_track(struct MPContext *mpctx, int order, pick = NULL; if (pick && pick->attached_picture && !mpctx->opts->audio_display) pick = NULL; + if (pick && !opts->autoload_files && pick->is_external) + pick = NULL; return pick; } @@ -605,6 +609,8 @@ void autoload_external_files(struct MPContext *mpctx) { if (mpctx->opts->sub_auto < 0 && mpctx->opts->audiofile_auto < 0) return; + if (!mpctx->opts->autoload_files) + return; void *tmp = talloc_new(NULL); char *base_filename = mpctx->filename; |