From 902b1a22b1cf96e7cbd94fc7371c5bef8a0e2049 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 23 Jul 2006 09:05:10 +0000 Subject: [PATCH] Take start time into consideration when calculation percentage position git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19165 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index f205928fd2..4e6e639c08 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -404,7 +404,7 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg) 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: {