/*
- * Copyright (C) 2004-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2004-2012 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
for (j = 1; ogg_sync_pageseek(&oss, &op) > 0; /* nothing */) {
int granule = ogg_page_granulepos(&op);
- while (granule > j * frames_per_chunk) {
+ while (granule >= (j + 1) * frames_per_chunk) {
j++;
if (j >= ct_size) {
ct_size *= 2;