ges: If last added clip is not in a layer, get the first layer
authorThibault Saunier <tsaunier@gnome.org>
Thu, 14 May 2015 09:12:20 +0000 (11:12 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Thu, 14 May 2015 13:31:52 +0000 (15:31 +0200)
Summary:
In case we just removed it from its layer, make sure to
just use the first layer when none specified.

Depends on D177

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D178

ges/ges-structured-interface.c

index 5228e3f..28db6a4 100644 (file)
@@ -358,6 +358,9 @@ _ges_add_clip_from_struct (GESTimeline * timeline, GstStructure * structure,
       layer = _ges_get_layer_by_priority (timeline, 0);
     else
       layer = ges_clip_get_layer (GES_CLIP (container));
+
+    if (!layer)
+      layer = _ges_get_layer_by_priority (timeline, 0);
   } else {
     layer = _ges_get_layer_by_priority (timeline, layer_priority);
   }