Remove unnecessary 'else'
Some server parameters may depend on one another. For example, audio_bit_rate is meaningless if audio is false. But it is inconsistent to disable some parameters based on these dependencies checks, but not others. Handling all dependencies between parameters would add too much complexity for no benefit. So just pass individual parameters independently. PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
This commit is contained in:
parent
feab87053a
commit
e89e772c7c
1 changed files with 2 additions and 1 deletions
|
@ -231,7 +231,8 @@ execute_server(struct sc_server *server,
|
||||||
}
|
}
|
||||||
if (!params->audio) {
|
if (!params->audio) {
|
||||||
ADD_PARAM("audio=false");
|
ADD_PARAM("audio=false");
|
||||||
} else if (params->audio_bit_rate) {
|
}
|
||||||
|
if (params->audio_bit_rate) {
|
||||||
ADD_PARAM("audio_bit_rate=%" PRIu32, params->audio_bit_rate);
|
ADD_PARAM("audio_bit_rate=%" PRIu32, params->audio_bit_rate);
|
||||||
}
|
}
|
||||||
if (params->video_codec != SC_CODEC_H264) {
|
if (params->video_codec != SC_CODEC_H264) {
|
||||||
|
|
Loading…
Reference in a new issue