summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2020-07-04 21:05:49 +0800
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-07-05 14:00:39 +0000
commit70800a8319c0c6fe5ab7e951d83fe48101526771 (patch)
treebe974c349eefeea9725ddf5623b5a3ec2a370cb8 /gst-libs
parentabea5e81c8fb314f1df7f2c37993174a343c2bb2 (diff)
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>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h265.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
index dc311464..c40d75fd 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)