]> git.sesse.net Git - nageru/blobdiff - h264encode.cpp
Release Nageru 1.2.1.
[nageru] / h264encode.cpp
index c923f475a94e7720316aa29d4aef3ee60549fead..523eae9a47a2ff299807e6444070e259b397354b 100644 (file)
@@ -1913,6 +1913,8 @@ RefCountedGLsync H264EncoderImpl::end_frame(int64_t pts, const vector<RefCounted
 
        RefCountedGLsync fence = RefCountedGLsync(GL_SYNC_GPU_COMMANDS_COMPLETE, /*flags=*/0);
        check_error();
+       glFlush();  // Make the H.264 thread see the fence as soon as possible.
+       check_error();
 
        {
                unique_lock<mutex> lock(frame_queue_mutex);