mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
fix audio files (mp3,wav) position calc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6839 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
dec82c2166
commit
f0706d8af6
@ -2919,7 +2919,9 @@ if(rel_seek_secs || abs_seek_pos){
|
||||
} 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;
|
||||
|
Loading…
Reference in New Issue
Block a user