# HG changeset patch # User arpi # Date 1032547149 0 # Node ID 9720e88cd0bc62702fccd790391bc55c5da64b44 # Parent 28785e6e6900a93a2a1a26e6dc1a3a99bce2e4e1 This tiny patch adds "type=2" absolute seconds seek capability. patch by Sidik Isani diff -r 28785e6e6900 -r 9720e88cd0bc DOCS/mplayer.1 --- a/DOCS/mplayer.1 Fri Sep 20 18:26:54 2002 +0000 +++ b/DOCS/mplayer.1 Fri Sep 20 18:39:09 2002 +0000 @@ -2075,9 +2075,10 @@ .TP .B Commands .RSs -.IPs "seek [type=<0/1>]" +.IPs "seek [type=<0/1/2>]" Seek to some place in the movie. Type 0 is a relative seek of +/- seconds. Type 1 seek to % in the movie. +Type 2 is a seek to an absolute position of seconds. .IPs "audio_delay " Adjust the audio delay of value seconds .IPs quit diff -r 28785e6e6900 -r 9720e88cd0bc mplayer.c --- a/mplayer.c Fri Sep 20 18:26:54 2002 +0000 +++ b/mplayer.c Fri Sep 20 18:39:09 2002 +0000 @@ -1949,7 +1949,13 @@ int v,abs; v = cmd->args[0].v.i; abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0; - if(abs) { + if(abs==2) { /* Absolute seek to a specific timestamp in seconds */ + abs_seek_pos = 1; + if(sh_video) + osd_function= (v > sh_video->timer) ? OSD_FFW : OSD_REW; + rel_seek_secs = v; + } + else if(abs) { /* Absolute seek by percentage */ abs_seek_pos = 3; if(sh_video) osd_function= (v > sh_video->timer) ? OSD_FFW : OSD_REW;