/*
- * Copyright (C) 2004-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2004-2013 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
-/** \file ogg_afh_common.c Functions common to ogg/vorbis and ogg/speex. */
+/** \file ogg_afh_common.c Functions common to all ogg/ codecs. */
#include <ogg/ogg.h>
#include <regex.h>
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;