From 6d7e33f5d48c4c0a7c5a163d4a16d564e43f6c43 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 14 Oct 2021 21:29:58 +0200 Subject: [PATCH] Fix an issue where scrubbing in Futatabi could lock up if there were no inputs going, with certain GL drivers. --- futatabi/jpeg_frame_view.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/futatabi/jpeg_frame_view.cpp b/futatabi/jpeg_frame_view.cpp index af89432..7da8f14 100644 --- a/futatabi/jpeg_frame_view.cpp +++ b/futatabi/jpeg_frame_view.cpp @@ -210,6 +210,7 @@ shared_ptr decode_jpeg(const string &jpeg) glFlushMappedNamedBufferRange(pbo.pbo, 0, dinfo.image_width * dinfo.image_height + chroma_width * chroma_height * 2); glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); pbo.upload_done = RefCountedGLsync(GL_SYNC_GPU_COMMANDS_COMPLETE, /*flags=*/0); + glFlush(); frame->uploaded_ui_thread = pbo.upload_done; frame->uploaded_interpolation = pbo.upload_done; global_pbo_pool->release_pbo(move(pbo)); -- 2.39.2