From b4301e2235aeee16399d1b3ac4a040ed086db238 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 12 Jan 2017 01:57:29 +1100 Subject: [PATCH] glutils: remove trivial helper function gst_gl_caps_replace_all_caps_features() is only used in two places and can be trivially reproduced. --- ext/gl/gstglmixer.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c index 3fc5aa6f50..9a7446ab0b 100644 --- a/ext/gl/gstglmixer.c +++ b/ext/gl/gstglmixer.c @@ -220,15 +220,21 @@ static GstCaps * _update_caps (GstVideoAggregator * vagg, GstCaps * caps, GstCaps * filter) { GstCaps *tmp; + guint i, n; if (filter) { tmp = gst_caps_intersect (caps, filter); } else { - tmp = caps; + tmp = gst_caps_copy (caps); } - return gst_gl_caps_replace_all_caps_features (tmp, - GST_CAPS_FEATURE_MEMORY_GL_MEMORY); + n = gst_caps_get_size (tmp); + for (i = 0; i < n; i++) { + gst_caps_set_features (tmp, i, + gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + } + + return tmp; } static GstCaps *