summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-24 16:06:27 +0100
committerwm4 <wm4@nowhere>2013-02-24 16:06:27 +0100
commit63601415d85041d439f43d5f489d034f118fb2ba (patch)
tree06f70f054a8bd431d1b5df86854465c664755493 /core/command.c
parente013fbd34e66270cf012a162ad1c46030a53fe69 (diff)
downloadmpv-63601415d85041d439f43d5f489d034f118fb2ba.tar.bz2
mpv-63601415d85041d439f43d5f489d034f118fb2ba.tar.xz
core: print correct quit message when quitting, simplify code
"End of file" was printed to the terminal instead of "Quit" when exiting with the "quit" slave command (closing the window and such). Note that it will still print EOF when it exists because the end of the playlist is reached. Do some other (not strictly related) simplifications.
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/command.c b/core/command.c
index 50fe09c555..644b1d37b2 100644
--- a/core/command.c
+++ b/core/command.c
@@ -1734,8 +1734,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
switch (cmd->id) {
case MP_CMD_SEEK: {
float v = cmd->args[0].v.f;
- int abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
- int exact = (cmd->nargs > 2) ? cmd->args[2].v.i : 0;
+ int abs = cmd->args[1].v.i;
+ int exact = cmd->args[2].v.i;
if (abs == 2) { // Absolute seek to a timestamp in seconds
queue_seek(mpctx, MPSEEK_ABSOLUTE, v, exact);
set_osd_function(mpctx,
@@ -1825,7 +1825,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
case MP_CMD_QUIT:
mpctx->stop_play = PT_QUIT;
- mpctx->quit_player_rc = (cmd->nargs > 0) ? cmd->args[0].v.i : 0;
+ mpctx->quit_player_rc = cmd->args[0].v.i;
break;
case MP_CMD_PLAYLIST_NEXT: