{
ogg_sync_state oss;
ogg_page op;
- long len = numbytes;
char *buf;
int ret, i, j, frames_per_chunk, ct_size;
long long unsigned num_frames = 0;
ogg_sync_init(&oss);
ret = -E_OGG_SYNC;
- buf = ogg_sync_buffer(&oss, len);
+ buf = ogg_sync_buffer(&oss, numbytes);
if (!buf)
goto out;
- memcpy(buf, map, len);
+ memcpy(buf, map, numbytes);
ret = -E_OGG_SYNC;
- if (ogg_sync_wrote(&oss, len) < 0)
+ if (ogg_sync_wrote(&oss, numbytes) < 0)
goto out;
ret = process_ogg_packets(&oss, afhi, ci);
if (ret < 0)
}
}
afhi->chunks_total = j;
+ set_max_chunk_size(afhi);
set_chunk_tv(frames_per_chunk, afhi->frequency, &afhi->chunk_tv);
ret = 0;
out: