From 16430c924720e2c8cb7041fbff6ae8b1bc822068 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Tue, 27 Oct 2026 20:06:25 +0200 Subject: [PATCH] MT#55283 EVS: fix lower bitrate clamp comparing against max_br When the negotiated fmtp has a bitrate range (br=A-B), the encoder's lower bound check compared the bitrate against max_br instead of min_br. Any bitrate below the upper bound was therefore forced down to the minimum, e.g. br=9.6-24.4 with the default 16.4 kbit/s ended up encoding at 9.6 kbit/s instead of staying at 16.4. Compare against min_br so the bitrate is only raised when it is actually below the lower bound. Closes #2223 Change-Id: I8bfaff332476e351e0b7a6a375a9c55bb3fa772f (cherry picked from commit 0402477b9682c915d30abda0c033232d7ca7bcad) (cherry picked from commit bdeda3188a3edb7490228235708deb1233ccf296) --- lib/evs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/evs.c b/lib/evs.c index 9d90d8e52..711770fc6 100644 --- a/lib/evs.c +++ b/lib/evs.c @@ -992,7 +992,7 @@ static const char *evs_encoder_init(encoder_t *enc, const str *extra_opts) { // EVS if (o->max_br && enc->bitrate > o->max_br) enc->bitrate = o->max_br; - if (o->min_br && enc->bitrate < o->max_br) + if (o->min_br && enc->bitrate < o->min_br) enc->bitrate = o->min_br; // verify bitrate