From 21bdee20612ce2cbb1f0902881447d25f9a6dcda Mon Sep 17 00:00:00 2001 From: Iason Paraskevopoulos Date: Tue, 26 Nov 2024 16:37:42 +0000 Subject: [PATCH] Fix enconding presets (#464) --- livekit/src/room/options.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livekit/src/room/options.rs b/livekit/src/room/options.rs index 76577e14..e17ac214 100644 --- a/livekit/src/room/options.rs +++ b/livekit/src/room/options.rs @@ -179,7 +179,7 @@ pub fn compute_appropriate_encoding( for preset in presets { encoding = preset.encoding.clone(); - if preset.width >= size { + if preset.width > size { break; } } @@ -257,6 +257,7 @@ pub fn into_rtp_encodings( }) } + encodings.reverse(); encodings }