Commit df40d36d authored by Niklas Haas's avatar Niklas Haas
Browse files

dav1dplay: don't freeze on render errors

Returning out of this function when pl_render_image() fails is the wrong
thing to do, since that leaves the swapchain frame acquired but never
submitted. Instead, just clear the target FBO to blank red (to make it
clear that something went wrong) and continue on with presentation.
parent dd1ed29b
......@@ -328,8 +328,7 @@ static void placebo_render(void *cookie, const Dav1dPlaySettings *settings)
if (!pl_render_image(rd_priv_ctx->renderer, &rd_priv_ctx->image, &target, &render_params)) {
fprintf(stderr, "Failed rendering frame!\n");
pl_tex_clear(rd_priv_ctx->gpu, target.fbo, (float[4]){ 1.0 });
ok = pl_swapchain_submit_frame(rd_priv_ctx->swapchain);
Supports Markdown
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