Displaying 1 result from an estimated 1 matches for "guess_ratio".
2009 May 04
1
[PATCH] oggz: inefficient seeking
...public header
diff --git a/src/liboggz/oggz_seek.c b/src/liboggz/oggz_seek.c
index c46f0ab..a8c1476 100644
--- a/src/liboggz/oggz_seek.c
+++ b/src/liboggz/oggz_seek.c
@@ -506,9 +506,15 @@ guess (ogg_int64_t unit_at, ogg_int64_t unit_target,
if (unit_at == unit_begin) return offset_begin;
- guess_ratio =
- GUESS_MULTIPLIER * (unit_target - unit_begin) /
- (unit_at - unit_begin);
+ if (unit_end != -1) {
+ guess_ratio =
+ GUESS_MULTIPLIER * (unit_target - unit_begin) /
+ (unit_end - unit_begin);
+ } else {
+ guess_ratio =
+ GUESS_MULTIPLIER * (unit_target - unit_begin)...