summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-10 15:13:04 +0200
committerwm4 <wm4@nowhere>2014-10-10 15:13:04 +0200
commit4758866a1821efb6fa022b7bde45fabbe6cbdd58 (patch)
tree19384ea927fe1643ab6e64fc419237246ce2854d
parentad541c26f7106e8f10e89b2318005cd805a98f85 (diff)
downloadmpv-4758866a1821efb6fa022b7bde45fabbe6cbdd58.tar.bz2
mpv-4758866a1821efb6fa022b7bde45fabbe6cbdd58.tar.xz
player: minor simplification
-rw-r--r--player/command.c2
-rw-r--r--player/loadfile.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/player/command.c b/player/command.c
index f0d96bd509..3a280e1353 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3836,7 +3836,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
}
case MP_CMD_STOP:
- // Go back to the starting point.
+ playlist_clear(mpctx->playlist);
mpctx->stop_play = PT_STOP;
break;
diff --git a/player/loadfile.c b/player/loadfile.c
index 2c0709dda7..cf6227e7a4 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1329,14 +1329,8 @@ void mp_play_files(struct MPContext *mpctx)
if (mpctx->stop_play == PT_NEXT_ENTRY) {
new_entry = mp_next_file(mpctx, +1, false);
- } else if (mpctx->stop_play == PT_CURRENT_ENTRY) {
- new_entry = mpctx->playlist->current;
- } else if (mpctx->stop_play == PT_RESTART) {
- // The same as PT_CURRENT_ENTRY, unless we decide that the current
- // playlist entry can be removed during playback.
+ } else {
new_entry = mpctx->playlist->current;
- } else { // PT_STOP
- playlist_clear(mpctx->playlist);
}
mpctx->playlist->current = new_entry;