summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-26 09:26:02 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-26 09:26:02 +0000
commit91e150c01922ef89f93249392ad29effc9f07ee8 (patch)
treedf2fb47db4fdafe9ec3f880f638cc7a30e77da28 /mplayer.c
parent387b2c088054022e8deebd02b5458269c4bbb094 (diff)
downloadmpv-91e150c01922ef89f93249392ad29effc9f07ee8.tar.bz2
mpv-91e150c01922ef89f93249392ad29effc9f07ee8.tar.xz
Gui: Allow progress bar to move when playing mov or mp4 files
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22826 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mplayer.c b/mplayer.c
index 4f7a06ac56..b1e94802a3 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3555,9 +3555,7 @@ if(rel_seek_secs || abs_seek_pos){
// get pos from frame number / total frames
guiIntfStruct.Position=(float)mpctx->d_video->pack_no*100.0f/mpctx->sh_video->video.dwLength;
} else {
- off_t len = ( mpctx->demuxer->movi_end - mpctx->demuxer->movi_start );
- off_t pos = ( mpctx->demuxer->file_format == DEMUXER_TYPE_AUDIO?mpctx->stream->pos:mpctx->demuxer->filepos );
- guiIntfStruct.Position=(len <= 0? 0.0f : ( pos - mpctx->demuxer->movi_start ) * 100.0f / len );
+ guiIntfStruct.Position=demuxer_get_percent_pos(mpctx->demuxer);
}
if ( mpctx->sh_video ) guiIntfStruct.TimeSec=mpctx->sh_video->pts;
else if ( mpctx->sh_audio ) guiIntfStruct.TimeSec=mpctx->delay;