if (remaining <= 0)
continue;
}
+ remaining += i - 47;
dctx->remaining = remaining;
- if (buf_size - i + 47 >= dctx->remaining) {
- int remaining = dctx->remaining;
-
+ if (buf_size >= dctx->remaining) {
pc->frame_start_found = 0;
pc->state64 = -1;
dctx->cur_byte = 0;
return remaining;
} else {
dctx->remaining -= buf_size;
+ // Update variables for correctness, they are currently not used beyond here
+ state = -1;
+ dctx->cur_byte += buf_size - i;
+ break;
}
}
}