aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite_vaapi.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-09 16:59:09 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-09 16:59:09 +0100
commita3fedae32937f8965c9905e12633fa4de0c3658e (patch)
treea8596397292e6fc674f8fe3c8f09f17b63b0d646 /src/capture/xcomposite_vaapi.c
parent5e05bbbbcbd45298c48af2b56a33da93d15b8f44 (diff)
Draw cursor in window capture
Diffstat (limited to 'src/capture/xcomposite_vaapi.c')
-rw-r--r--src/capture/xcomposite_vaapi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/capture/xcomposite_vaapi.c b/src/capture/xcomposite_vaapi.c
index 570901b..a19956d 100644
--- a/src/capture/xcomposite_vaapi.c
+++ b/src/capture/xcomposite_vaapi.c
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <va/va.h>
#include <va/va_drmcommon.h>
+#include <libavcodec/avcodec.h>
typedef struct {
gsr_capture_xcomposite xcomposite;
@@ -62,6 +63,12 @@ static void gsr_capture_xcomposite_vaapi_stop(gsr_capture *cap, AVCodecContext *
}
}
+ if(video_codec_context->hw_device_ctx)
+ av_buffer_unref(&video_codec_context->hw_device_ctx);
+ if(video_codec_context->hw_frames_ctx)
+ av_buffer_unref(&video_codec_context->hw_frames_ctx);
+
+ gsr_capture_base_stop(&cap_xcomp->xcomposite.base, cap_xcomp->xcomposite.params.egl);
gsr_capture_xcomposite_stop(&cap_xcomp->xcomposite, video_codec_context);
}