Fix missing pl_swapchain_submit_frame() when AVFrame mapping fails

This commit is contained in:
Cameron Gutman committed 2026-11-15 00:03:55 -06:00
1 parent 5ff51ead5e
commit bbfcf53f85
1 file changed
+9 -1
@@ -1017,7 +1017,15 @@ void PlVkRenderer::renderFrame(AVFrame *frame)
}
if (!mapAvFrameToPlacebo(frame, &mappedFrame)) {
// This function logs internally
// Submit the pending swapchain frame so swapchain state stays consistent
m_HasPendingSwapchainFrame = false;
if (!pl_swapchain_submit_frame(m_Swapchain)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"pl_swapchain_submit_frame() failed");
SDL_Event event;
event.type = SDL_RENDER_DEVICE_RESET;
SDL_PushEvent(&event);
}
return;
}