Commit 14388c3c authored by Janne Grunau's avatar Janne Grunau

call dav1d_get_picture() until it returns -EAGAIN for draining

With the decoupled decoding data there might be remaining input data during
draining which can cause bitstream parsing errors.
parent e890a66f
Pipeline #2667 passed with stages
in 2 minutes and 55 seconds
......@@ -121,7 +121,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
err = dav1d_get_picture(ctx, &pic);
if (err == 0)
dav1d_picture_unref(&pic);
} while (err == 0);
} while (err != -EAGAIN);
cleanup:
dav1d_flush(ctx);
......
......@@ -151,9 +151,10 @@ int main(const int argc, char *const *const argv) {
if (res != -EAGAIN) {
fprintf(stderr, "Error decoding frame: %s\n",
strerror(-res));
} else
} else {
res = 0;
break;
break;
}
} else {
if (!n_out) {
if ((res = output_open(&out, cli_settings.muxer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment