summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-04 16:30:48 +0200
committerwm4 <wm4@nowhere>2019-10-04 16:30:48 +0200
commit6064720011c7864bb97b4bb6dd2872246908c1c5 (patch)
tree68ef72845cbeebc821314e7f89d42b3cc716eb60 /player/main.c
parente49cec58328e549ba2da9d47e1845924281aabaa (diff)
downloadmpv-6064720011c7864bb97b4bb6dd2872246908c1c5.tar.bz2
mpv-6064720011c7864bb97b4bb6dd2872246908c1c5.tar.xz
player: "subprocess" command should stop immediately in idle mode
The description of the "playback_only" field in the "subprocess" command says "you can't start it outside of playback". This did not work correctly: if the player was started in idle mode in the first place, the subprocess was allowed to run even with playback_only=yes. This is a bug, and this change fixes it. Add a test for this to command-test.lua. For #7025.
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/main.c b/player/main.c
index 4ab25a942c..bc6a3b1f97 100644
--- a/player/main.c
+++ b/player/main.c
@@ -319,6 +319,8 @@ struct MPContext *mp_create(void)
if (verbose_env)
mpctx->opts->verbose = atoi(verbose_env);
+ mp_cancel_trigger(mpctx->playback_abort);
+
return mpctx;
}