wma: Defer decoding until two data blocks are available.
[paraslash.git] / wmadec_filter.c
index d78c72b..96fb500 100644 (file)
@@ -1255,11 +1255,12 @@ next_buffer:
                        fn->min_iqs += 4096;
                        goto next_buffer;
                }
-               fn->min_iqs = WMA_FRAME_SKIP + pwd->ahi.block_align;
+               fn->min_iqs = 2 * (WMA_FRAME_SKIP + pwd->ahi.block_align);
                fn->private_data = pwd;
                converted = pwd->ahi.header_len;
                goto success;
        }
+       fn->min_iqs = WMA_FRAME_SKIP + pwd->ahi.block_align;
        for (;;) {
                char *out;
                int out_size = WMA_OUTPUT_BUFFER_SIZE;