mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
gstvaapiencoder: Fix crash when handling rate control mask
Having a ratecontrol_mask equal to zero is not a bug, but the driver might not be supporting any kind of rate control mechanisms. Eg: JPEG Encoding
This commit is contained in:
parent
0609fad69c
commit
3332c25ef6
1 changed files with 1 additions and 1 deletions
|
@ -854,7 +854,7 @@ gst_vaapi_encoder_set_rate_control (GstVaapiEncoder * encoder,
|
|||
goto error_operation_failed;
|
||||
|
||||
rate_control_mask = get_rate_control_mask (encoder);
|
||||
if (!(rate_control_mask & (1U << rate_control)))
|
||||
if (rate_control_mask && !(rate_control_mask & (1U << rate_control)))
|
||||
goto error_unsupported_rate_control;
|
||||
|
||||
encoder->rate_control = rate_control;
|
||||
|
|
Loading…
Reference in a new issue