ges: Always set ANY capsfeatures on tracks caps property
authorThibault Saunier <tsaunier@gnome.org>
Fri, 20 Feb 2015 12:51:47 +0000 (13:51 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 20 Feb 2015 13:10:56 +0000 (14:10 +0100)
Summary:
We should not restrict the CapsFeatures on the track caps.
If someone want to do such a restriction he should add it to
the restriction caps directly

Test Plan: Run testsuite

Reviewers: mathieu.duponchelle

ges/ges-track.c

index fe1ce00..c8b86d5 100644 (file)
@@ -718,11 +718,15 @@ ges_track_set_timeline (GESTrack * track, GESTimeline * timeline)
  * @caps: the #GstCaps to set
  *
  * Sets the given @caps on the track.
+ * Note that the capsfeatures of @caps will always be set
+ * to ANY. If you want to restrict them, you should
+ * do it in #ges_track_set_restriction_caps.
  */
 void
 ges_track_set_caps (GESTrack * track, const GstCaps * caps)
 {
   GESTrackPrivate *priv;
+  gint i;
 
   g_return_if_fail (GES_IS_TRACK (track));
 
@@ -735,6 +739,9 @@ ges_track_set_caps (GESTrack * track, const GstCaps * caps)
     gst_caps_unref (priv->caps);
   priv->caps = gst_caps_copy (caps);
 
+  for (i = 0; i < (int) gst_caps_get_size (priv->caps); i++)
+    gst_caps_set_features (priv->caps, i, gst_caps_features_new_any ());
+
   g_object_set (priv->composition, "caps", caps, NULL);
   /* FIXME : update all trackelements ? */
 }