diff libmpdemux/demux_lavf.c @ 19160:ccb42ce33c23

Take start time into consideration when calculation percentage position
author reimar
date Sun, 23 Jul 2006 09:05:10 +0000
parents 8b52dad54b1d
children c636a4e9565a
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Sun Jul 23 08:35:18 2006 +0000
+++ b/libmpdemux/demux_lavf.c	Sun Jul 23 09:05:10 2006 +0000
@@ -404,7 +404,7 @@
 	    if (priv->avfc->duration == 0)
 	        return DEMUXER_CTRL_DONTKNOW;
 	    
-	    *((int *)arg) = (int)(priv->last_pts*100 / priv->avfc->duration);
+	    *((int *)arg) = (int)((priv->last_pts - priv->avfc->start_time)*100 / priv->avfc->duration);
 	    return DEMUXER_CTRL_OK;
 	case DEMUXER_CTRL_SWITCH_AUDIO:
 	{