mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
uri-clip: Make sure to instantiate an asset to back GESUriClip-s
This commit is contained in:
parent
9cd45028ae
commit
5f81e64b59
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue