aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite_drm.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-03-17 17:17:14 +0100
committerdec05eba <dec05eba@protonmail.com>2023-03-17 17:17:14 +0100
commit93cb6593a642018e3373fb7099e1c0687b367176 (patch)
tree63d24dc3a9a03e71857ef793929f6000f75cc3db /src/capture/xcomposite_drm.c
parent8cbdb596ebf79587a432ed40583630b6cd39ed88 (diff)
Add overclocking option -oc to workaround a NVIDIA driver bug (forcefully set to p2 state when using cuda)
Diffstat (limited to 'src/capture/xcomposite_drm.c')
-rw-r--r--src/capture/xcomposite_drm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/capture/xcomposite_drm.c b/src/capture/xcomposite_drm.c
index 9fb323d..489fc45 100644
--- a/src/capture/xcomposite_drm.c
+++ b/src/capture/xcomposite_drm.c
@@ -706,6 +706,7 @@ static void gsr_capture_xcomposite_drm_tick(gsr_capture *cap, AVCodecContext *vi
#define FOURCC_NV12 842094158
if(prime.fourcc == FOURCC_NV12) { // This happens on AMD
+ while(cap_xcomp->egl.glGetError()) {}
while(cap_xcomp->egl.eglGetError() != EGL_SUCCESS){}
EGLImage images[2];
@@ -902,7 +903,8 @@ static void gsr_capture_xcomposite_drm_destroy(gsr_capture *cap, AVCodecContext
cap->priv = NULL;
}
if(cap_xcomp->dpy) {
- XCloseDisplay(cap_xcomp->dpy);
+ // TODO: This causes a crash, why? maybe some other library dlclose xlib and that also happened to unload this???
+ //XCloseDisplay(cap_xcomp->dpy);
cap_xcomp->dpy = NULL;
}
free(cap);