aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite_cuda.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-01-18 13:26:25 +0100
committerdec05eba <dec05eba@protonmail.com>2023-01-18 13:26:25 +0100
commita17e8a1a77ebcb7b2deb5dee3739581881700871 (patch)
tree314fb2cdd544893d4d939f14ada823a337a9da50 /src/capture/xcomposite_cuda.c
parentbf6fbea73681387617d4afc28d71b5b6fea96b77 (diff)
Fix crash on error: dont do av_buffer_unref on frame contex because device_ctx frees it as well
Diffstat (limited to 'src/capture/xcomposite_cuda.c')
-rw-r--r--src/capture/xcomposite_cuda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/capture/xcomposite_cuda.c b/src/capture/xcomposite_cuda.c
index 6b2b72c..6c8550c 100644
--- a/src/capture/xcomposite_cuda.c
+++ b/src/capture/xcomposite_cuda.c
@@ -126,7 +126,7 @@ static bool cuda_create_codec_context(gsr_capture_xcomposite_cuda *cap_xcomp, AV
fprintf(stderr, "Error: Failed to initialize hardware frame context "
"(note: ffmpeg version needs to be > 4.0)\n");
av_buffer_unref(&device_ctx);
- av_buffer_unref(&frame_context);
+ //av_buffer_unref(&frame_context);
cap_xcomp->cuda.cuCtxPopCurrent_v2(&old_ctx);
return false;
}