[Spice-devel] [PATCH spice-server] gstreamer: Correctly don't allow too limited bit rates
Francois Gouget
fgouget at codeweavers.com
Thu Dec 1 15:44:11 UTC 2016
On Thu, 1 Dec 2016, Frediano Ziglio wrote:
> 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>
> ---
Acked-by: Francois Gouget <fgouget at codeweavers.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));
>
--
Francois Gouget <fgouget at codeweavers.com>
More information about the Spice-devel
mailing list