mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
ges: Fix reloading timeline from project
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7629>
This commit is contained in:
parent
0e9634e17c
commit
2dbe077619
2 changed files with 9 additions and 2 deletions
|
@ -1293,11 +1293,17 @@ ges_project_load (GESProject * project, GESTimeline * timeline, GError ** error)
|
|||
g_return_val_if_fail (project->priv->uri, FALSE);
|
||||
g_return_val_if_fail (timeline->tracks == NULL, FALSE);
|
||||
|
||||
if (!_load_project (project, timeline, error))
|
||||
return FALSE;
|
||||
GESProject *previous = gst_object_ref (ges_timeline_get_project (timeline));
|
||||
|
||||
ges_extractable_set_asset (GES_EXTRACTABLE (timeline), GES_ASSET (project));
|
||||
if (!_load_project (project, timeline, error)) {
|
||||
ges_extractable_set_asset (GES_EXTRACTABLE (timeline),
|
||||
GES_ASSET (previous));
|
||||
gst_object_unref (previous);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
gst_object_unref (previous);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -330,6 +330,7 @@ ges_extractable_interface_init (GESExtractableInterface * iface)
|
|||
iface->asset_type = GES_TYPE_PROJECT;
|
||||
iface->check_id = (GESExtractableCheckId) extractable_check_id;
|
||||
iface->get_id = extractable_get_id;
|
||||
iface->can_update_asset = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue