From 87190969a758d7c20c39a456f05926bff42ac533 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 10 Aug 2016 22:22:50 +0200 Subject: player: add --no-autoload-files option Allt his auto-loading is getting annoying especially for testing. --- player/loadfile.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'player/loadfile.c') 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; -- cgit v1.2.3