vaapiencode: h264: ignore level without breaking negotiation

Since commit 9f627ef2 if the user sets level in the encoder src caps
the caps negotiation is rejected.

But since the same commit the same encoder set the autoconfigured
level in caps. Some change in the base class might fixed the operation
order so now the caps are set and later negotiated.

This patch removes the level check.

Fixes: #273
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/382>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-08-14 10:42:51 +02:00 committed by GStreamer Merge Bot
parent 7a3b25884c
commit ae6d4f3969

View file

@ -296,12 +296,7 @@ gst_vaapiencode_h264_set_config (GstVaapiEncode * base_encode)
stream_format = gst_structure_get_string (structure, "stream-format");
encode->is_avc = (g_strcmp0 (stream_format, "avc") == 0);
if (gst_structure_has_field (structure, "level")) {
/* @TODO(victor): add a mechansim for user set a specific
* level */
GST_WARNING_OBJECT (encode, "cannot set level configuration");
ret = FALSE;
} else if (profile != GST_VAAPI_PROFILE_UNKNOWN) {
if (profile != GST_VAAPI_PROFILE_UNKNOWN) {
GST_INFO ("using %s profile as target decoder constraints",
gst_vaapi_utils_h264_get_profile_string (profile));
ret = gst_vaapi_encoder_h264_set_max_profile (encoder, profile);