From 3554f06235aaee322eaf7f8187ed6c67123e745d Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 3 Jul 2020 00:53:31 +0800 Subject: libs: encoder: h265: modify set_max_profile to set_allowed_profiles. In h265, bigger profile idc may not be compatible with the small profile idc. And more important, there are multi profiles with the same profile idc. Such as main-422-10, main-444 and main-444-10, they all have profile idc 4. So recording the max profile idc is not enough, the encoder needs to know all allowed profiles when deciding the real profile. Part-of: --- gst/vaapi/gstvaapiencode_h265.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gst') diff --git a/gst/vaapi/gstvaapiencode_h265.c b/gst/vaapi/gstvaapiencode_h265.c index c94d7460..9ee8855e 100644 --- a/gst/vaapi/gstvaapiencode_h265.c +++ b/gst/vaapi/gstvaapiencode_h265.c @@ -153,7 +153,7 @@ gst_vaapiencode_h265_set_config (GstVaapiEncode * base_encode) if (profile) { GST_INFO ("using %s profile as target decoder constraints", gst_vaapi_utils_h265_get_profile_string (profile)); - if (!gst_vaapi_encoder_h265_set_max_profile (encoder, profile)) + if (!gst_vaapi_encoder_h265_set_allowed_profiles (encoder, NULL)) return FALSE; } return TRUE; -- cgit v1.2.1