The check to limit too low bit rates was setting encoder->bit_rate
instead of bit_rate. However after some lines bit_rate was used
to set encoder->bit_rate basically removing the lower threshold.

Signed-off-by: Frediano Ziglio <fzig...@redhat.com>
---
 server/gstreamer-encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index b9b1a56..e28ab00 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -595,7 +595,7 @@ static void set_bit_rate(SpiceGstEncoder *encoder, uint64_t 
bit_rate)
     }
     if (bit_rate < SPICE_GST_MIN_BITRATE) {
         /* Don't let the bit rate go too low... */
-        encoder->bit_rate = SPICE_GST_MIN_BITRATE;
+        bit_rate = SPICE_GST_MIN_BITRATE;
     } else if (bit_rate > encoder->bit_rate) {
         /* or too high */
         bit_rate = MIN(bit_rate, get_bit_rate_cap(encoder));
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to