mirror of
https://github.com/mpv-player/mpv
synced 2025-03-21 18:57:35 +00:00
Quick hack to implement percent-based seeking, also fixes seeking with gmplayer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20508 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7006b27bb8
commit
99c0130bda
@ -1841,6 +1841,8 @@ static void demux_seek_real(demuxer_t *demuxer, float rel_seek_secs, float audio
|
||||
if (flags & 1)
|
||||
/* seek absolute */
|
||||
priv->current_apacket = priv->current_vpacket = 0;
|
||||
if (flags & 2) // percent seek
|
||||
rel_seek_secs *= priv->duration;
|
||||
|
||||
if ((streams & 1) && priv->current_vpacket >= priv->index_table_size[vid])
|
||||
priv->current_vpacket = priv->index_table_size[vid] - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user