mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-22 20:45:01 +00:00
Force --no-audio if no display and no recording
The client does not use the audio stream if there is no display and no recording (i.e. only V4L2), so disable audio so that the device does not attempt to capture it.
This commit is contained in:
parent
fa5e40c6b8
commit
0026ea4cd9
1 changed files with 5 additions and 0 deletions
|
@ -1740,6 +1740,11 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||
}
|
||||
#endif
|
||||
|
||||
if (opts->audio && !opts->display && !opts->record_filename) {
|
||||
LOGI("No display and no recording: audio disabled");
|
||||
opts->audio = false;
|
||||
}
|
||||
|
||||
if ((opts->tunnel_host || opts->tunnel_port) && !opts->force_adb_forward) {
|
||||
LOGI("Tunnel host/port is set, "
|
||||
"--force-adb-forward automatically enabled.");
|
||||
|
|
Loading…
Add table
Reference in a new issue