diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-21 16:38:15 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-21 16:38:15 +0200 |
commit | 95e1971f8fc2b9f1814a80ffa19d17fc4eda9e47 (patch) | |
tree | b2a288c1aa46be23aa91f304cc55f8fc5c5909f7 /src/capture/kms.c | |
parent | fb707aee6f61cef84cc15a3a00f46e7bf52f3ceb (diff) |
Fix first frame is black
Diffstat (limited to 'src/capture/kms.c')
-rw-r--r-- | src/capture/kms.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/capture/kms.c b/src/capture/kms.c index 7a61962..ecc75a5 100644 --- a/src/capture/kms.c +++ b/src/capture/kms.c @@ -570,6 +570,9 @@ static int gsr_capture_kms_capture(gsr_capture *cap, AVFrame *frame, gsr_color_c if(!capture_is_combined_plane) capture_pos = (vec2i){drm_fd->x, drm_fd->y}; + self->params.egl->glFlush(); + self->params.egl->glFinish(); + /* Fast opengl free path */ if(self->monitor_rotation == GSR_MONITOR_ROT_0 && video_codec_context_is_vaapi(self->video_codec_context) && self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD) { int fds[4]; |