mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
gldownload: Simplify caps feature setting code
This commit is contained in:
parent
b81823e7db
commit
938d172fc2
1 changed files with 3 additions and 10 deletions
|
@ -188,17 +188,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;
|
||||
|
|
Loading…
Reference in a new issue