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:
reimar 2006-10-29 12:32:12 +00:00
parent 7006b27bb8
commit 99c0130bda
1 changed files with 2 additions and 0 deletions

View File

@ -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;