diff options
| author | Monty <xiphmont@xiph.org> | 2009-04-08 00:53:57 +0000 |
|---|---|---|
| committer | Monty <xiphmont@xiph.org> | 2009-04-08 00:53:57 +0000 |
| commit | 75ade212651f2ac86c62575bf521fe4d6ca578a4 (patch) | |
| tree | 3f9c0b186da55f368884fe205f54417807d61730 | |
| parent | ccf6f98023ea920f66415bf5a73701307d6f97de (diff) | |
| download | libvorbis-git-75ade212651f2ac86c62575bf521fe4d6ca578a4.tar.gz | |
Patch for "seek broken for large files and on pure 32 bit architectures"
svn path=/trunk/vorbis/; revision=15921
| -rw-r--r-- | lib/vorbisfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c index c9408314..08a55f3d 100644 --- a/lib/vorbisfile.c +++ b/lib/vorbisfile.c @@ -1324,8 +1324,9 @@ int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ bisect=begin; }else{ /* take a (pretty decent) guess. */ - bisect=begin + - (target-begintime)*(end-begin)/(endtime-begintime) - CHUNKSIZE; + bisect=begin + + (ogg_int64_t)((double)(target-begintime)*(end-begin)/(endtime-begintime)) + - CHUNKSIZE; if(bisect<=begin) bisect=begin+1; } |
