mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
container: Handle children pasting failures
This commit is contained in:
parent
3b95bec095
commit
b3e449fd4f
2 changed files with 24 additions and 0 deletions
|
@ -348,6 +348,15 @@ _paste (GESTimelineElement * element, GESTimelineElement * ref,
|
||||||
nchild =
|
nchild =
|
||||||
ges_timeline_element_paste (map->child,
|
ges_timeline_element_paste (map->child,
|
||||||
paste_position - map->start_offset);
|
paste_position - map->start_offset);
|
||||||
|
|
||||||
|
if (!nchild) {
|
||||||
|
while (ncontainer->children)
|
||||||
|
ges_container_remove (ncontainer, ncontainer->children->data);
|
||||||
|
|
||||||
|
g_object_unref (ncontainer);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (ncontainer),
|
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (ncontainer),
|
||||||
GES_TIMELINE_ELEMENT_TIMELINE (ref));
|
GES_TIMELINE_ELEMENT_TIMELINE (ref));
|
||||||
ges_container_add (ncontainer, nchild);
|
ges_container_add (ncontainer, nchild);
|
||||||
|
|
|
@ -721,6 +721,21 @@ class TestInvalidOverlaps(common.GESSimpleTimelineTest):
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
|
|
||||||
|
group = GES.Group.new()
|
||||||
|
group.add(clip)
|
||||||
|
|
||||||
|
copied_group = group.copy(True)
|
||||||
|
self.assertFalse(copied_group.paste(group.props.start))
|
||||||
|
self.assertTimelineTopology([
|
||||||
|
[
|
||||||
|
(GES.TestClip, 0, 10),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
(GES.TestClip, 0, 10),
|
||||||
|
(GES.TestClip, 1, 10),
|
||||||
|
],
|
||||||
|
])
|
||||||
|
|
||||||
def test_move_group_with_overlaping_clips(self):
|
def test_move_group_with_overlaping_clips(self):
|
||||||
self.track_types = [GES.TrackType.AUDIO]
|
self.track_types = [GES.TrackType.AUDIO]
|
||||||
super().setUp()
|
super().setUp()
|
||||||
|
|
Loading…
Reference in a new issue