mirror of
https://github.com/mpv-player/mpv
synced 2024-10-14 11:54:36 +02:00
Make seek command parameter float.
Patch by Oded Shimon [ods15 at ods15 dot dyndns dot org]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14719 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
80ddeccff9
commit
f47114f932
@ -46,7 +46,7 @@
|
|||||||
/// is the default value wich is used for optional arguments
|
/// is the default value wich is used for optional arguments
|
||||||
|
|
||||||
static mp_cmd_t mp_cmds[] = {
|
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
|
#ifdef USE_EDL
|
||||||
{ MP_CMD_EDL_MARK, "edl_mark", 0, { {-1,{0}} } },
|
{ MP_CMD_EDL_MARK, "edl_mark", 0, { {-1,{0}} } },
|
||||||
#endif
|
#endif
|
||||||
|
@ -2750,9 +2750,10 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
|
|||||||
while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
|
while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
|
||||||
switch(cmd->id) {
|
switch(cmd->id) {
|
||||||
case MP_CMD_SEEK : {
|
case MP_CMD_SEEK : {
|
||||||
int v,abs;
|
float v;
|
||||||
|
int abs;
|
||||||
osd_show_percentage = 25;
|
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;
|
abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
|
||||||
if(abs==2) { /* Absolute seek to a specific timestamp in seconds */
|
if(abs==2) { /* Absolute seek to a specific timestamp in seconds */
|
||||||
abs_seek_pos = 1;
|
abs_seek_pos = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user