struct private_aacdec_data *padd = fn->private_data;
int i, ret;
char *inbuf, *outbuf, *btrbuf;
- size_t len, consumed, loaded;
+ size_t len, consumed, loaded = 0;
NeAACDecFrameInfo frame_info;
next_buffer:
if (!frame_info.samples)
goto success;
btrbuf = para_malloc(2 * frame_info.samples);
- loaded = 0;
for (i = 0; i < frame_info.samples; i++) {
short sh = ((short *)outbuf)[i];
write_int16_host_endian(btrbuf + loaded, sh);
success:
btr_consume(btrn, consumed);
padd->consumed_total += consumed;
- goto next_buffer;
+ if (loaded == 0)
+ goto next_buffer;
+ return 1;
err:
assert(ret < 0);
btr_remove_node(&fn->btrn);