search for: unit_end

Displaying 2 results from an estimated 2 matches for "unit_end".

Did you mean: inst_end
2009 May 15
0
[PATCH] oggz: limit seeking to specified range
..._t offset_begin, + ogg_int64_t offset_end) { OggzReader * reader; oggz_off_t offset_orig, offset_at, offset_guess; - oggz_off_t offset_begin, offset_end = -1, offset_next; + oggz_off_t offset_next; ogg_int64_t granule_at; - ogg_int64_t unit_at, unit_begin = 0, unit_end = -1, unit_last_iter = -1; + ogg_int64_t unit_at, unit_begin = -1, unit_end = -1, unit_last_iter = -1; long serialno; ogg_page * og; int hit_eof = 0; if (oggz == NULL) { return -1; } if (unit_target > 0 && !oggz_has_metrics (oggz)) { #ifdef DEBUG - p...
2009 May 04
1
[PATCH] oggz: inefficient seeking
...0644 --- 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) / + (unit_at - unit_begin); + } #ifdef DEBUG printf ("oggz_seek::guess: guess_ratio...