Skip to content

Commit

Permalink
Remove unnecessary 'else'
Browse files Browse the repository at this point in the history
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 <#3978>
  • Loading branch information
rom1v committed May 8, 2023
1 parent feab870 commit e89e772
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ execute_server(struct sc_server *server,
}
if (!params->audio) {
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);
}
if (params->video_codec != SC_CODEC_H264) {
Expand Down

0 comments on commit e89e772

Please sign in to comment.