asset: Handle trying to proxy an asset to itself
authorThibault Saunier <tsaunier@igalia.com>
Sun, 14 Jul 2019 20:28:23 +0000 (16:28 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Mon, 15 Jul 2019 14:30:44 +0000 (10:30 -0400)
And avoid infinite recursion

ges/ges-asset.c

index f574a87..19d17b5 100644 (file)
@@ -769,7 +769,9 @@ ges_asset_set_proxy (GESAsset * asset, GESAsset * proxy)
 
     GST_INFO_OBJECT (asset, "%s Making sure the proxy chain is fully set.",
         ges_asset_get_id (entry->asset));
-    ges_asset_set_proxy (NULL, asset);
+    if (g_strcmp0 (asset->priv->proxied_asset_id, proxy->priv->id) ||
+        g_strcmp0 (asset->priv->id, proxy->priv->proxied_asset_id))
+      ges_asset_set_proxy (NULL, asset);
   }
 
   if (proxy->priv->proxy_target) {