[Spice-devel] [PATCH spice-server] gstreamer: Correctly don't allow too limited bit rates
Frediano Ziglio
fziglio at redhat.com
Thu Dec 1 12:25:54 UTC 2016
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 <fziglio at 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
More information about the Spice-devel
mailing list