changeset 14718:11376fd550ac

Make seek command parameter float. Patch by Oded Shimon [ods15 at ods15 dot dyndns dot org].
author reimar
date Thu, 17 Feb 2005 15:56:25 +0000
parents 51a7560a92b7
children a76f1a68ed75
files input/input.c mplayer.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Thu Feb 17 15:35:44 2005 +0000
+++ b/input/input.c	Thu Feb 17 15:56:25 2005 +0000
@@ -46,7 +46,7 @@
 /// is the default value wich is used for optional arguments
 
 static mp_cmd_t mp_cmds[] = {
-  { MP_CMD_SEEK, "seek", 1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
+  { MP_CMD_SEEK, "seek", 1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
 #ifdef USE_EDL
   { MP_CMD_EDL_MARK, "edl_mark", 0, { {-1,{0}} } },
 #endif
--- a/mplayer.c	Thu Feb 17 15:35:44 2005 +0000
+++ b/mplayer.c	Thu Feb 17 15:56:25 2005 +0000
@@ -2750,9 +2750,10 @@
   while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
     switch(cmd->id) {
     case MP_CMD_SEEK : {
-      int v,abs;
+      float v;
+      int abs;
       osd_show_percentage = 25;
-      v = cmd->args[0].v.i;
+      v = cmd->args[0].v.f;
       abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
       if(abs==2) { /* Absolute seek to a specific timestamp in seconds */
         abs_seek_pos = 1;