From da484b7ab9904beae0128aa2066f5d04a9c9e840 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 12 May 2024 10:44:27 +0200 Subject: [PATCH] Reject recording with control only If video and audio are disabled, there is nothing to record. --- app/src/cli.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/cli.c b/app/src/cli.c index 0caeea5c..a180c0e6 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -2738,6 +2738,11 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], } if (opts->record_filename) { + if (!opts->video && !opts->audio) { + LOGE("Video and audio disabled, nothing to record"); + return false; + } + if (!opts->record_format) { opts->record_format = guess_record_format(opts->record_filename); if (!opts->record_format) {