[MPlayer-cvslog] r19165 - trunk/libmpdemux/demux_lavf.c

reimar subversion at mplayerhq.hu
Sun Jul 23 11:05:11 CEST 2006


Author: reimar
Date: Sun Jul 23 11:05:10 2006
New Revision: 19165

Modified:
   trunk/libmpdemux/demux_lavf.c

Log:
Take start time into consideration when calculation percentage position


Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	(original)
+++ trunk/libmpdemux/demux_lavf.c	Sun Jul 23 11:05:10 2006
@@ -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:
 	{



More information about the MPlayer-cvslog mailing list