vaapidecode: always merge profile caps in sink caps

This commit fixes a regression of e962069d, where if the profile's
caps doesn't have a caps profile, it's ignored.

This patch add a conditional jump if the caps doesn't have a profile
field to merge it.

Fixes: #271
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/368>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-07-28 20:00:09 +02:00
parent 525abc6d1e
commit ecd1ca81a7

View file

@ -1289,7 +1289,7 @@ gst_vaapidecode_ensure_allowed_sinkpad_caps (GstVaapiDecode * decode)
profile_name = gst_vaapi_profile_get_name (profile);
if (!profile_name)
continue;
goto merge_caps;
/* Add all according -intra profile for HEVC */
if (profile == GST_VAAPI_PROFILE_H265_MAIN
@ -1346,8 +1346,8 @@ gst_vaapidecode_ensure_allowed_sinkpad_caps (GstVaapiDecode * decode)
profile_name, NULL);
}
merge_caps:
gst_vaapi_profile_caps_append_decoder (display, profile, structure);
allowed_sinkpad_caps = gst_caps_merge (allowed_sinkpad_caps, caps);
}