diff options
author | wm4 <wm4@nowhere> | 2019-11-08 14:29:58 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-08 14:29:58 +0100 |
commit | 98b38b04c9f771562cdf262c6fa49734a318f5ce (patch) | |
tree | bbb462af631d41266fa5b93511c878e4d1c6603d /player/main.c | |
parent | 3e401bf652eadf39aed2dee250dfed6168760fce (diff) | |
download | mpv-98b38b04c9f771562cdf262c6fa49734a318f5ce.tar.bz2 mpv-98b38b04c9f771562cdf262c6fa49734a318f5ce.tar.xz |
player: do not require dummy file arguments to use --unittest
Move the test execution above the point where it checks for an empty
playlist and exits if that's the case.
Diffstat (limited to 'player/main.c')
-rw-r--r-- | player/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/player/main.c b/player/main.c index 1c8c8014b1..d2fb22668f 100644 --- a/player/main.c +++ b/player/main.c @@ -396,6 +396,11 @@ int mp_initialize(struct MPContext *mpctx, char **options) return -1; } +#if HAVE_TESTS + if (opts->test_mode && opts->test_mode[0]) + return run_tests(mpctx) ? 1 : -1; +#endif + if (!mpctx->playlist->first && !opts->player_idle_mode) { // nothing to play mp_print_version(mpctx->log, true); @@ -430,11 +435,6 @@ int mp_initialize(struct MPContext *mpctx, char **options) if (opts->force_vo == 2 && handle_force_window(mpctx, false) < 0) return -1; -#if HAVE_TESTS - if (opts->test_mode && opts->test_mode[0]) - return run_tests(mpctx) ? 1 : -1; -#endif - MP_STATS(mpctx, "end init"); return 0; |