diff libmpdemux/demux_real.c @ 20492:0b563edd9b3a

Quick hack to implement percent-based seeking, also fixes seeking with gmplayer
author reimar
date Sun, 29 Oct 2006 12:32:12 +0000
parents cd827d62fb71
children 2d274de63b54
line wrap: on
line diff
--- a/libmpdemux/demux_real.c	Sun Oct 29 11:38:14 2006 +0000
+++ b/libmpdemux/demux_real.c	Sun Oct 29 12:32:12 2006 +0000
@@ -1841,6 +1841,8 @@
     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;