int i, ret;
struct private_mp3dec_data *pmd = fn->private_data;
struct btr_node *btrn = fn->btrn;
- size_t loaded = 0, len, iqs;
+ size_t loaded = 0, len;
char *inbuffer, *outbuffer;
next_buffer:
pmd->stream.error = 0;
- iqs = btr_get_input_queue_size(btrn);
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0)
goto err;
if (ret < 0) {
mp3dec_consume(btrn, &pmd->stream, len);
if (pmd->stream.error == MAD_ERROR_BUFLEN) {
- if (len == iqs && btr_no_parent(btrn)) {
+ if (fn->min_iqs > 0 && btr_no_parent(btrn)) {
ret = -E_EOF;
goto err;
}
mad_stream_sync(&pmd->stream);
if (pmd->stream.error == MAD_ERROR_BUFLEN) {
ret = -E_EOF;
- if (len == iqs && btr_no_parent(btrn))
+ if (btr_no_parent(btrn))
goto err;
fn->min_iqs += 100;
ret = -E_MP3DEC_CORRUPT;