Reject recording with control only

If video and audio are disabled, there is nothing to record.
This commit is contained in:
Romain Vimont 2024-05-12 10:44:27 +02:00
parent 063a8339ed
commit da484b7ab9

View file

@ -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) {