summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-24 21:16:23 +0100
committerwm4 <wm4@nowhere>2013-02-26 01:55:52 +0100
commit2254416a5d58ba38bee21f11083f135aabe4e926 (patch)
tree5743108827d3b075d8fd1b2ae8a7c2a9d1e4318b /core/command.c
parent7af2bc66079a0d427946e10ec7869fa042a6ae8a (diff)
downloadmpv-2254416a5d58ba38bee21f11083f135aabe4e926.tar.bz2
mpv-2254416a5d58ba38bee21f11083f135aabe4e926.tar.xz
commands: parse seek time arguments like time options
This means a commands like "seek 13:00 absolute" actually behaves like "--start=13:00", instead of interpreting the argument as fraction as with normal float options. This is probably slightly closer to what you'd expect. As a consequence, the seek argument's type changes from float to double internally.
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/command.c b/core/command.c
index 35083f4aa3..cb6843eab4 100644
--- a/core/command.c
+++ b/core/command.c
@@ -1723,7 +1723,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
int osdl = msg_osd ? 1 : OSD_LEVEL_INVISIBLE;
switch (cmd->id) {
case MP_CMD_SEEK: {
- float v = cmd->args[0].v.f;
+ double v = cmd->args[0].v.d;
int abs = cmd->args[1].v.i;
int exact = cmd->args[2].v.i;
if (abs == 2) { // Absolute seek to a timestamp in seconds