From e89e772c7c3df65e33362a542cd900f46cf62baf Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 7 May 2023 12:02:45 +0200 Subject: [PATCH] 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 --- app/src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/server.c b/app/src/server.c index 8c4e9a95..2b35c085 100644 --- a/app/src/server.c +++ b/app/src/server.c @@ -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) {