From 00cdda2ae80f2f3c5b6fc4302d7edaf14755d037 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Jan 2020 19:25:54 +0100 Subject: scripting: make player error when attempting to load unknown scripts It's ridiculous that --script=something.dumb does not cause an error. Make it error, and extend this behavior to the scripts/ sub-dir in the mpv config dir. --- player/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index 6cb56ef601..83ded7469a 100644 --- a/player/main.c +++ b/player/main.c @@ -433,7 +433,8 @@ int mp_initialize(struct MPContext *mpctx, char **options) MP_WARN(mpctx, "There will be no OSD and no text subtitles.\n"); #endif - mp_load_scripts(mpctx); + if (!mp_load_scripts(mpctx)) + return -1; if (opts->force_vo == 2 && handle_force_window(mpctx, false) < 0) return -1; -- cgit v1.2.3