mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 21:07:29 +01:00
Take start time into consideration when calculation percentage position
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19165 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6ca4f9ea81
commit
902b1a22b1
@ -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:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user