mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Fix % seeking
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5797 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
924836a40b
commit
8f44305b62
@ -288,10 +288,11 @@ void demux_audio_seek(demuxer_t *demuxer,float rel_seek_secs,int flags){
|
||||
return;
|
||||
}
|
||||
|
||||
base = flags&1 ? demuxer->movi_start : stream_tell(s) ;
|
||||
len = (demuxer->movi_end && flags&2) ? (demuxer->movi_end - demuxer->movi_start)*rel_seek_secs : rel_seek_secs;
|
||||
|
||||
pos = base+(len*sh_audio->i_bps);
|
||||
base = flags&1 ? demuxer->movi_start : stream_tell(s);
|
||||
if(flags&2)
|
||||
pos = base + ((demuxer->movi_end - demuxer->movi_start)*rel_seek_secs);
|
||||
else
|
||||
pos = base + (rel_seek_secs*sh_audio->i_bps);
|
||||
|
||||
if(demuxer->movi_end && pos >= demuxer->movi_end) {
|
||||
sh_audio->timer = (stream_tell(s) - demuxer->movi_start)/(float)sh_audio->i_bps;
|
||||
|
Loading…
Reference in New Issue
Block a user