fix seeking bug

Originally committed as revision 4123 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2005-04-12 13:33:22 +00:00
parent 67c311fafa
commit 17929c0468

View File

@ -554,7 +554,7 @@ ogg_read_seek (AVFormatContext * s, int stream_index, int64_t target_ts,
ogg_save (s); ogg_save (s);
while (min <= max){ while (min <= max){
uint64_t p = min + (max - min) * target_ts / (tmax - tmin); uint64_t p = min + (max - min) * (target_ts - tmin) / (tmax - tmin);
int i = -1; int i = -1;
url_fseek (bc, p, SEEK_SET); url_fseek (bc, p, SEEK_SET);