Displaying 2 results from an estimated 2 matches for "offset_guess".
2009 May 15
0
[PATCH] oggz: limit seeking to specified range
...Z * oggz, ogg_int64_t unit_target)
+ogg_int64_t
+oggz_bounded_seek_set (OGGZ * oggz,
+ ogg_int64_t unit_target,
+ ogg_int64_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...
2009 May 04
1
[PATCH] oggz: inefficient seeking
...(oggz_get_prev_start_page (oggz, og, &granulepos, &serialno) >= 0) {
+ unit_end = oggz_get_unit (oggz, serialno, granulepos);
+ }
+ }
og = &oggz->current_page;
@@ -682,6 +697,10 @@ oggz_seek_set (OGGZ * oggz, ogg_int64_t unit_target)
break;
}
+ if (offset_guess > offset_end) {
+ offset_guess = offset_end;
+ }
+
offset_at = oggz_seek_raw (oggz, offset_guess, SEEK_SET);
if (offset_at == -1) {
goto notfound;
diff --git a/src/tools/oggz-dump.c b/src/tools/oggz-dump.c
index fc7e3ba..56c5eb6 100644
--- a/src/tools/oggz-dump.c
+++ b/s...