struct private_aacdec_data {
/** the return value of aac_open */
NeAACDecHandle handle;
- /** info about the currently decoded frame */
- NeAACDecFrameInfo frame_info;
/** whether this instance of the aac decoder is already initialized */
int initialized;
/** number of times the decoder returned an error */
int i, ret;
char *inbuf, *outbuf, *btrbuf;
size_t len, consumed, loaded;
+ NeAACDecFrameInfo frame_info;
next_buffer:
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
goto success;
//PARA_CRIT_LOG("consumed: %zu (%zu + %zu), have: %zu\n", padd->consumed_total + consumed,
// padd->consumed_total, consumed, len - consumed);
- outbuf = NeAACDecDecode(padd->handle, &padd->frame_info,
+ outbuf = NeAACDecDecode(padd->handle, &frame_info,
(unsigned char *)inbuf + consumed, len - consumed);
- if (padd->frame_info.error) {
- int err = padd->frame_info.error;
+ if (frame_info.error) {
+ int err = frame_info.error;
ret = -E_AAC_DECODE;
if (padd->error_count++ > MAX_ERRORS)
goto err;
PARA_NOTICE_LOG("consumed (total, buffer, frame): "
"%zu, %zu, %lu\n",
padd->consumed_total, consumed,
- padd->frame_info.bytesconsumed);
+ frame_info.bytesconsumed);
consumed++; /* just eat one byte and hope for the best */
goto success;
}
padd->error_count = 0;
- //PARA_CRIT_LOG("decoder ate %lu\n", padd->frame_info.bytesconsumed);
- consumed += padd->frame_info.bytesconsumed;
- if (!padd->frame_info.samples)
+ //PARA_CRIT_LOG("decoder ate %lu\n", frame_info.bytesconsumed);
+ consumed += frame_info.bytesconsumed;
+ if (!frame_info.samples)
goto success;
- btrbuf = para_malloc(2 * padd->frame_info.samples);
+ btrbuf = para_malloc(2 * frame_info.samples);
loaded = 0;
- for (i = 0; i < padd->frame_info.samples; i++) {
+ for (i = 0; i < frame_info.samples; i++) {
short sh = ((short *)outbuf)[i];
write_int16_host_endian(btrbuf + loaded, sh);
loaded += 2;