summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-02-09 12:32:52 +1100
committerMatthew Waters <matthew@centricular.com>2018-02-09 12:33:28 +1100
commit0d69b9d3ccb943f416a87cb3d1a6c6b1f519a891 (patch)
tree42e458660b5440a17a189cc519fdc11cb8e60b23
parent5b970a75fa3b99906245b8cfc71cafc049c6ef4b (diff)
gldownload: remove texture-target field from dmabuf/sysmem caps
https://bugzilla.gnome.org/show_bug.cgi?id=792342
-rw-r--r--ext/gl/gstgldownloadelement.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/gl/gstgldownloadelement.c b/ext/gl/gstgldownloadelement.c
index c8f101eaa..826e98350 100644
--- a/ext/gl/gstgldownloadelement.c
+++ b/ext/gl/gstgldownloadelement.c
@@ -159,6 +159,18 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name)
return tmp;
}
+static void
+_remove_field (GstCaps * caps, const gchar * field)
+{
+ guint n = gst_caps_get_size (caps);
+ guint i = 0;
+
+ for (i = 0; i < n; i++) {
+ GstStructure *s = gst_caps_get_structure (caps, i);
+ gst_structure_remove_field (s, field);
+ }
+}
+
static GstCaps *
gst_gl_download_element_transform_caps (GstBaseTransform * bt,
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
@@ -174,10 +186,12 @@ gst_gl_download_element_transform_caps (GstBaseTransform * bt,
#if GST_GL_HAVE_PLATFORM_EGL && GST_GL_HAVE_DMABUF
newcaps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_DMABUF);
+ _remove_field (newcaps, "texture-target");
tmp = gst_caps_merge (tmp, newcaps);
#endif
newcaps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
+ _remove_field (newcaps, "texture-target");
tmp = gst_caps_merge (tmp, newcaps);
}