ges: Fix reloading timeline from project

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7629>
This commit is contained in:
Thibault Saunier 2024-10-02 14:16:11 -03:00 committed by GStreamer Marge Bot
parent 0e9634e17c
commit 2dbe077619
2 changed files with 9 additions and 2 deletions

View file

@ -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;
}

View file

@ -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