PARA_DEBUG_LOG("writing group %d (%d/%d decoded data bytes)\n",
fg->h.group_num, fg->h.group_bytes,
fg->h.data_slices_per_group * sb);
- if (fn->btrn) {
- need = (fg->h.data_slices_per_group - i) * sb;
- if (need > btr_pool_unused(pfd->btrp))
- return -E_FECDEC_OVERRUN;
- btr_pool_get_buffer(pfd->btrp, &buf);
- p = buf;
- } else {
- need = fn->loaded + (fg->h.data_slices_per_group - i) * sb;
- if (need > fn->bufsize) {
- fn->bufsize = PARA_MAX(fn->bufsize * 2, need);
- if (fn->bufsize > FECDEC_MAX_OUTBUF_SIZE)
- return -E_FECDEC_OVERRUN;
- PARA_INFO_LOG("increasing fec buf to %zu\n", fn->bufsize);
- fn->buf = para_realloc(fn->buf, fn->bufsize);
- }
- p = fn->buf + fn->loaded;
- }
+ need = (fg->h.data_slices_per_group - i) * sb;
+ if (need > btr_pool_unused(pfd->btrp))
+ return -E_FECDEC_OVERRUN;
+ btr_pool_get_buffer(pfd->btrp, &buf);
+ p = buf;
if (u == FEC_GROUP_USABLE_WITH_HEADER) {
PARA_INFO_LOG("writing audio file header\n");
written = 0;