- fn->min_iqs = WMA_FRAME_SKIP + pwd->ahi.block_align;
- for (;;) {
- char *out;
- int out_size = WMA_OUTPUT_BUFFER_SIZE;
- if (converted + fn->min_iqs > len)
- break;
- out = para_malloc(WMA_OUTPUT_BUFFER_SIZE);
- ret = wma_decode_superframe(pwd, out,
- &out_size, (uint8_t *)in + converted + WMA_FRAME_SKIP,
- len - WMA_FRAME_SKIP);
- if (ret < 0) {
- free(out);
- goto err;
- }
- btr_add_output(out, out_size, btrn);
- converted += ret + WMA_FRAME_SKIP;
+ fn->min_iqs = pwd->ahi.packet_size;
+ if (fn->min_iqs > len)
+ goto success;
+ out_size = WMA_OUTPUT_BUFFER_SIZE;
+ out = para_malloc(out_size);
+ ret = wma_decode_superframe(pwd, out, &out_size,
+ (uint8_t *)in + WMA_FRAME_SKIP, len - WMA_FRAME_SKIP);
+ if (ret < 0) {
+ free(out);
+ goto err;