aboutsummaryrefslogtreecommitdiff
path: root/src/capture
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-07-22 23:12:08 +0200
committerdec05eba <dec05eba@protonmail.com>2023-07-22 23:22:51 +0200
commitd45597e104fa3bd80a6f1922f2fdeaa6a0eff724 (patch)
tree55a291bb46ebd7061cbffb1f0fca2a75a6b39776 /src/capture
parent9ca5b8ec3a818454ebb139ae9007184584aa2f5e (diff)
Exit with exit code 10 if pkexec fails
Diffstat (limited to 'src/capture')
-rw-r--r--src/capture/kms_cuda.c5
-rw-r--r--src/capture/kms_vaapi.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/capture/kms_cuda.c b/src/capture/kms_cuda.c
index e6fa42f..d6d8774 100644
--- a/src/capture/kms_cuda.c
+++ b/src/capture/kms_cuda.c
@@ -139,9 +139,10 @@ static int gsr_capture_kms_cuda_start(gsr_capture *cap, AVCodecContext *video_co
}
cap_kms->using_wayland_capture = true;
} else {
- if(gsr_kms_client_init(&cap_kms->kms_client, cap_kms->params.card_path) != 0) {
+ int kms_init_res = gsr_kms_client_init(&cap_kms->kms_client, cap_kms->params.card_path);
+ if(kms_init_res != 0) {
gsr_capture_kms_cuda_stop(cap, video_codec_context);
- return -1;
+ return kms_init_res;
}
MonitorCallbackUserdata monitor_callback_userdata = {
diff --git a/src/capture/kms_vaapi.c b/src/capture/kms_vaapi.c
index cc9aad9..04e9658 100644
--- a/src/capture/kms_vaapi.c
+++ b/src/capture/kms_vaapi.c
@@ -142,9 +142,10 @@ static int gsr_capture_kms_vaapi_start(gsr_capture *cap, AVCodecContext *video_c
}
cap_kms->using_wayland_capture = true;
} else {
- if(gsr_kms_client_init(&cap_kms->kms_client, cap_kms->params.card_path) != 0) {
+ int kms_init_res = gsr_kms_client_init(&cap_kms->kms_client, cap_kms->params.card_path);
+ if(kms_init_res != 0) {
gsr_capture_kms_vaapi_stop(cap, video_codec_context);
- return -1;
+ return kms_init_res;
}
MonitorCallbackUserdata monitor_callback_userdata = {