uriclip: Add an error message when creating a clip failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/252>
This commit is contained in:
Thibault Saunier 2021-05-18 11:42:22 -04:00 committed by GStreamer Marge Bot
parent cb4dab37a1
commit 712f3d32d4

View file

@ -607,11 +607,15 @@ ges_uri_clip_create_track_elements (GESClip * clip, GESTrackType type)
GESUriClip *
ges_uri_clip_new (const gchar * uri)
{
GESAsset *asset = GES_ASSET (ges_uri_clip_asset_request_sync (uri, NULL));
GError *err = NULL;
GESUriClip *res = NULL;
GESAsset *asset = GES_ASSET (ges_uri_clip_asset_request_sync (uri, &err));
if (asset) {
res = GES_URI_CLIP (ges_asset_extract (asset, NULL));
res = GES_URI_CLIP (ges_asset_extract (asset, &err));
if (!res && err)
GST_ERROR ("Could not analyze %s: %s", uri, err->message);
gst_object_unref (asset);
} else
GST_ERROR ("Could not create asset for uri: %s", uri);