From 68379649db122e1d143e2f700edc81224500c2ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 16 Nov 2021 10:40:03 +0100 Subject: [PATCH] vapostproc: Append featured caps rather than merge. So it would be possible to honor upstream preference. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvavpp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index 42f14c1..6540a17 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -893,14 +893,17 @@ gst_va_vpp_transform_caps (GstBaseTransform * trans, GstPadDirection direction, ret = gst_va_vpp_caps_remove_fields (caps); tmp = gst_va_vpp_complete_caps_features (ret, GST_CAPS_FEATURE_MEMORY_VA); - ret = gst_caps_merge (ret, tmp); + if (!gst_caps_is_subset (tmp, ret)) + gst_caps_append (ret, tmp); tmp = gst_va_vpp_complete_caps_features (ret, GST_CAPS_FEATURE_MEMORY_DMABUF); - ret = gst_caps_merge (ret, tmp); + if (!gst_caps_is_subset (tmp, ret)) + gst_caps_append (ret, tmp); tmp = gst_va_vpp_complete_caps_features (ret, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); - ret = gst_caps_merge (ret, tmp); + if (!gst_caps_is_subset (tmp, ret)) + gst_caps_append (ret, tmp); if (filter) { GstCaps *intersection; -- 2.7.4