Mercurial > mplayer.hg
changeset 5796:7a4b18b787c0
Fix % seeking
author | albeu |
---|---|
date | Tue, 23 Apr 2002 13:27:46 +0000 |
parents | 6ee426749843 |
children | c31ad722f491 |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Tue Apr 23 13:26:56 2002 +0000 +++ b/libmpdemux/demux_audio.c Tue Apr 23 13:27:46 2002 +0000 @@ -288,10 +288,11 @@ 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;