libs: encoder: h265: fix a bug to get get_profile_tier_level.

0 is a valid value for h265 tier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/350>
This commit is contained in:
He Junyan 2020-07-04 21:05:49 +08:00 committed by Víctor Manuel Jáquez Leal
parent abea5e81c8
commit 70800a8319

View file

@ -3705,7 +3705,8 @@ gst_vaapi_encoder_h265_get_profile_tier_level (GstVaapiEncoderH265 * encoder,
{ {
g_return_val_if_fail (encoder != NULL, FALSE); g_return_val_if_fail (encoder != NULL, FALSE);
if (!encoder->profile || !encoder->tier || !encoder->level) if (!encoder->profile || encoder->tier == GST_VAAPI_TIER_H265_UNKNOWN
|| !encoder->level)
return FALSE; return FALSE;
if (out_profile_ptr) if (out_profile_ptr)