From d45597e104fa3bd80a6f1922f2fdeaa6a0eff724 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 22 Jul 2023 23:12:08 +0200 Subject: Exit with exit code 10 if pkexec fails --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index c5dd33f..22f929e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1687,9 +1687,10 @@ int main(int argc, char **argv) { if(replay_buffer_size_secs == -1) video_stream = create_stream(av_format_context, video_codec_context); - if(gsr_capture_start(capture, video_codec_context) != 0) { + int capture_result = gsr_capture_start(capture, video_codec_context); + if(capture_result != 0) { fprintf(stderr, "gsr error: gsr_capture_start failed\n"); - _exit(1); + _exit(capture_result); } open_video(video_codec_context, quality, very_old_gpu, gpu_inf.vendor, pixel_format); -- cgit v1.2.3