summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-06 18:18:13 +0200
committerwm4 <wm4@nowhere>2015-10-06 18:19:20 +0200
commitecb776f88efdc7df6d0493ce97ab44528704272f (patch)
tree30d1734f5de253d764da58ce574abfb1b3e51ae5 /player/command.c
parent1c593f1497b8c5efa2d08467d72f7c4de348d385 (diff)
downloadmpv-ecb776f88efdc7df6d0493ce97ab44528704272f.tar.bz2
mpv-ecb776f88efdc7df6d0493ce97ab44528704272f.tar.xz
player: make stop command actually stop
The stop command didn't always stop. In this case, opening a HLS URL and then sending "stop" during loading would actually make it fallback to parsing it as a playlist, and then continued to play the playlist items. (This corner case makes several unfortunate factors come together to produce this really odd behavior.) Another issue is that the "stop" was not always explicitly set. This could be a problem when sending several commands at once. Only the "quit" command should have priority over the "stop" command, so this is still checked.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 87f4061fe6..fff34fad5b 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4588,7 +4588,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
case MP_CMD_STOP:
playlist_clear(mpctx->playlist);
- if (!mpctx->stop_play)
+ if (mpctx->stop_play != PT_QUIT)
mpctx->stop_play = PT_STOP;
break;