mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
ges-uri-asset: GstDiscoverer can return a valid info but a non-OK result, consider this an error
The asynchronous case in ges_uri_clip_asset_request_async() already considered it an error, do the same in ges_uri_clip_asset_request_sync(). https://bugzilla.gnome.org/show_bug.cgi?id=767293
This commit is contained in:
parent
2ef72b7276
commit
90b5735f7a
1 changed files with 12 additions and 0 deletions
|
@ -520,12 +520,24 @@ ges_uri_clip_asset_request_sync (const gchar * uri, GError ** error)
|
|||
info = gst_discoverer_discover_uri (discoverer, uri, &lerror);
|
||||
}
|
||||
|
||||
/* We might get a discoverer info but it might have a non-OK result. We
|
||||
* should consider that an error */
|
||||
if (!lerror && info
|
||||
&& gst_discoverer_info_get_result (info) != GST_DISCOVERER_OK) {
|
||||
lerror =
|
||||
g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
|
||||
"Stream %s discovering failed (error code: %d)", uri,
|
||||
gst_discoverer_info_get_result (info));
|
||||
}
|
||||
|
||||
ges_asset_cache_put (gst_object_ref (asset), NULL);
|
||||
ges_uri_clip_asset_set_info (asset, info);
|
||||
ges_asset_cache_set_loaded (GES_TYPE_URI_CLIP, uri, lerror);
|
||||
|
||||
if (info == NULL || lerror != NULL) {
|
||||
gst_object_unref (asset);
|
||||
if (info)
|
||||
gst_discoverer_info_unref (info);
|
||||
if (lerror)
|
||||
g_propagate_error (error, lerror);
|
||||
|
||||
|
|
Loading…
Reference in a new issue