summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-01-19 19:25:54 +0100
committerwm4 <wm4@nowhere>2020-01-19 19:25:54 +0100
commit00cdda2ae80f2f3c5b6fc4302d7edaf14755d037 (patch)
tree783efd7934056ad73a68593cf2878c5e89235958 /player/main.c
parentee7be62dbc3c25b835c5f14b81382a5c306aa15b (diff)
downloadmpv-00cdda2ae80f2f3c5b6fc4302d7edaf14755d037.tar.bz2
mpv-00cdda2ae80f2f3c5b6fc4302d7edaf14755d037.tar.xz
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.
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c3
1 files changed, 2 insertions, 1 deletions
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;