Mercurial > mplayer.hg
changeset 6838:a3867d6e2c11
fix audio files (mp3,wav) position calc
author | pontscho |
---|---|
date | Tue, 30 Jul 2002 11:46:29 +0000 |
parents | f2008c92ec64 |
children | a94cde7ef947 |
files | mplayer.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Tue Jul 30 09:17:19 2002 +0000 +++ b/mplayer.c Tue Jul 30 11:46:29 2002 +0000 @@ -2919,7 +2919,9 @@ } else { // get pos from file position / filesize int len=((demuxer->movi_end-demuxer->movi_start)); - int pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos; + int pos; + if ( demuxer->file_format==DEMUXER_TYPE_AUDIO ) pos=stream->pos; + else pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos; guiIntfStruct.Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f); } if ( sh_video ) guiIntfStruct.TimeSec=d_video->pts;