Commit dc0770bf authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

uri-asset: Ensure that UriAssets loaded with error are remembered

parent 55c88a72
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "ges-track-element-asset.h" #include "ges-track-element-asset.h"
static GHashTable *parent_newparent_table = NULL; static GHashTable *parent_newparent_table = NULL;
static void static void
initable_iface_init (GInitableIface * initable_iface) initable_iface_init (GInitableIface * initable_iface)
{ {
...@@ -491,6 +492,10 @@ ges_uri_clip_asset_request_sync (const gchar * uri, GError ** error) ...@@ -491,6 +492,10 @@ ges_uri_clip_asset_request_sync (const gchar * uri, GError ** error)
info = gst_discoverer_discover_uri (discoverer, uri, &lerror); info = gst_discoverer_discover_uri (discoverer, uri, &lerror);
} }
ges_asset_cache_put (gst_object_ref (asset), NULL);
ges_uri_clip_asset_set_info (asset, info);
ges_asset_cache_set_loaded (GES_TYPE_URI_CLIP, uri, lerror);
if (info == NULL || lerror != NULL) { if (info == NULL || lerror != NULL) {
gst_object_unref (asset); gst_object_unref (asset);
if (lerror) if (lerror)
...@@ -499,10 +504,6 @@ ges_uri_clip_asset_request_sync (const gchar * uri, GError ** error) ...@@ -499,10 +504,6 @@ ges_uri_clip_asset_request_sync (const gchar * uri, GError ** error)
return NULL; return NULL;
} }
ges_asset_cache_put (gst_object_ref (asset), NULL);
ges_uri_clip_asset_set_info (asset, info);
ges_asset_cache_set_loaded (GES_TYPE_URI_CLIP, uri, lerror);
return asset; return asset;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment