diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.c b/gst-libs/gst/vaapi/gstvaapiprofile.c index c50ca2b5b7..6337fe99e2 100644 --- a/gst-libs/gst/vaapi/gstvaapiprofile.c +++ b/gst-libs/gst/vaapi/gstvaapiprofile.c @@ -131,12 +131,13 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = { }, #if VA_CHECK_VERSION(0,32,0) { GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline, - "image/jpeg", "baseline" + "image/jpeg", NULL }, #endif #if VA_CHECK_VERSION(0,35,0) - {GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3, - "video/x-vp8", "Version0_3"}, + { GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3, + "video/x-vp8", NULL + }, #endif { 0, } }; diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 11ae6bb743..deef49a0b7 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -924,15 +924,15 @@ gst_vaapidecode_ensure_allowed_caps(GstVaapiDecode *decode) if (!media_type_name) continue; - profile_name = gst_vaapi_profile_get_name(profile); - if (!profile_name) - continue; - caps = gst_caps_from_string(media_type_name); if (!caps) continue; structure = gst_caps_get_structure (caps, 0); - gst_structure_set (structure, "profile", G_TYPE_STRING, profile_name, NULL); + + profile_name = gst_vaapi_profile_get_name(profile); + if (profile_name) + gst_structure_set(structure, "profile", G_TYPE_STRING, + profile_name, NULL); allowed_caps = gst_caps_merge(allowed_caps, caps); }