From 90967b3d455a3357d5d17de14ebd4053771fdcc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 6 Mar 2015 18:36:12 +0100 Subject: [PATCH] glupload: Simplify caps feature setting code --- gst-libs/gst/gl/gstglupload.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index c84602e4ff..fae5408b43 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -78,17 +78,10 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) guint i = 0; for (i = 0; i < n; i++) { - GstCapsFeatures *features = gst_caps_get_features (tmp, i); - if (features) { - guint n_f = gst_caps_features_get_size (features); - guint j = 0; - for (j = 0; j < n_f; j++) { - gst_caps_features_remove_id (features, - gst_caps_features_get_nth_id (features, j)); - } - } + GstCapsFeatures *features; - gst_caps_features_add (features, feature_name); + features = gst_caps_features_new (feature_name, NULL); + gst_caps_set_features (tmp, i, features); } return tmp;