From 70800a8319c0c6fe5ab7e951d83fe48101526771 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Sat, 4 Jul 2020 21:05:49 +0800 Subject: [PATCH] libs: encoder: h265: fix a bug to get get_profile_tier_level. 0 is a valid value for h265 tier. Part-of: --- gst-libs/gst/vaapi/gstvaapiencoder_h265.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c index dc311464ce..c40d75fd80 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c @@ -3705,7 +3705,8 @@ gst_vaapi_encoder_h265_get_profile_tier_level (GstVaapiEncoderH265 * encoder, { 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; if (out_profile_ptr)