From: Thibault Saunier Date: Fri, 30 Oct 2015 09:52:12 +0000 (+0100) Subject: uri-clip: Make sure to instantiate an asset to back GESUriClip-s X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f81e64b596d3234406df75ccfde11009c422729;p=platform%2Fupstream%2Fgst-editing-services.git uri-clip: Make sure to instantiate an asset to back GESUriClip-s --- diff --git a/ges/ges-uri-clip.c b/ges/ges-uri-clip.c index d70312e..652d1c6 100644 --- a/ges/ges-uri-clip.c +++ b/ges/ges-uri-clip.c @@ -472,10 +472,14 @@ ges_uri_clip_create_track_element (GESClip * clip, GESTrackType type) GESUriClip * ges_uri_clip_new (gchar * uri) { + GESAsset *asset = GES_ASSET (ges_uri_clip_asset_request_sync (uri, NULL)); GESUriClip *res = NULL; - if (gst_uri_is_valid (uri)) - res = g_object_new (GES_TYPE_URI_CLIP, "uri", uri, NULL); + if (asset) { + res = GES_URI_CLIP (ges_asset_extract (asset, NULL)); + gst_object_unref (asset); + } else + GST_ERROR ("Could not create asset for uri: %s", uri); return res; }