From fa8a2ec55eceb6d1fd34652e87531e35b73f30c7 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 22 Nov 2023 10:42:07 +0000 Subject: [PATCH] ges: uri-clip: Set error on invalid URI's in check_id The _check_id function signature was incomplete and the last GError argument was ignored instead of being properly used. Part-of: --- subprojects/gst-editing-services/ges/ges-uri-clip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-editing-services/ges/ges-uri-clip.c b/subprojects/gst-editing-services/ges/ges-uri-clip.c index a4e8cca953..62e3c105c2 100644 --- a/subprojects/gst-editing-services/ges/ges-uri-clip.c +++ b/subprojects/gst-editing-services/ges/ges-uri-clip.c @@ -192,11 +192,13 @@ ges_uri_clip_class_init (GESUriClipClass * klass) } static gchar * -extractable_check_id (GType type, const gchar * id) +extractable_check_id (GType type, const gchar * id, GError ** error) { if (gst_uri_is_valid (id)) return g_strdup (id); + g_set_error (error, GES_ERROR, GES_ERROR_ASSET_WRONG_ID, "URI %s is invalid", + id); return NULL; } @@ -442,7 +444,7 @@ static void ges_extractable_interface_init (GESExtractableInterface * iface) { iface->asset_type = GES_TYPE_URI_CLIP_ASSET; - iface->check_id = (GESExtractableCheckId) extractable_check_id; + iface->check_id = extractable_check_id; iface->get_parameters_from_id = extractable_get_parameters_from_id; iface->get_id = extractable_get_id; iface->can_update_asset = TRUE;