From ecd1ca81a7098bcb16a71e9c2f574ac29b8e9166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 28 Jul 2020 20:00:09 +0200 Subject: 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: --- gst/vaapi/gstvaapidecode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gst') diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 4d9add3e..59ec6e95 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -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); } -- cgit v1.2.1