From: Monty Date: Wed, 8 Apr 2009 00:53:57 +0000 (+0000) Subject: Patch for "seek broken for large files and on pure 32 bit architectures" X-Git-Tag: v1.3.3~168 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75ade212651f2ac86c62575bf521fe4d6ca578a4;p=platform%2Fupstream%2Flibvorbis.git Patch for "seek broken for large files and on pure 32 bit architectures" svn path=/trunk/vorbis/; revision=15921 --- diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c index c940831..08a55f3 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; }