Mercurial > mplayer.hg
changeset 19160:ccb42ce33c23
Take start time into consideration when calculation percentage position
author | reimar |
---|---|
date | Sun, 23 Jul 2006 09:05:10 +0000 |
parents | 7945609397b0 |
children | 049c74156629 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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: {